The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Util::Medley::String - utility methods for working with strings

VERSION

version 0.024

SYNOPSIS

...

DESCRIPTION

...

METHODS

camelize

Converts a string to camelcase.

usage:
  $camelCase = $util->camelize($str);

  $camelCase = $util->camelize(str => $str);
args:
str [Str]

The string you wish to camelize.

isBlank

Checks whether a string is strictly whitespace or empty.

usage:
  $bool = $util->isBlank($str);

  $bool = $util->isBlank(str => $str);
args:
str [Str]

The string to check.

isInt

Just a pass-through to String::Util::Numeric::isint.

usage:
  $bool = $util->isInt($str);

  $bool = $util->isInt(str => $str);
args:
str [Str]

The string you wish to check for an integer.

lTrim

Just a pass-through to String::Util::lTrim.

usage:
  $lTrimmed = $util->lTrim($str);

  $lTrimmed = $util->lTrim(str => $str);
args:
str [Str]

The string to lTrim.

pascalize

Converts a string to Pascal case.

usage:
  $pascalCase = $util->pascalize($str);

  $pascalCase = $util->pascalize(str => $str);
args:
str [Str]

The string you wish to camelize.

rTrim

Just a pass-through to String::Util::rTrim.

usage:
  $rTrimmed = $util->rTrim($str);

  $rTrimmed = $util->rTrim(str => $str);
args:
str [Str]

The string to rTrim.

snakelize

Converts a string to snake case.

usage:
  $snakeCase = $util->snakeize($str);

  $snakeCase = $util->snakeize(str => $str);
args:
str [Str]

The string to snakeize.

titleize

Converts a string to title case.

usage:
  $titleCase = $util->titleize($str);

  $titleCase = $util->titleize(str => $str);
args:
str [Str]

The string to titleize.

trim

Just a pass-through to String::Util::trim.

usage:
  $trimmed = $util->trim($str);

  $trimmed = $util->trim(str => $str);
args:
str [Str]

The string to trim.

undefToString

Convert scalar to a string if its value is undef. The string arg is optional and defaults to ''.

usage:
  $str = $util->undefToString($str);

  $str = $util->undefToString(str => $str);
args:
val [Str]

The string to check for undef.

str [Str]

The string to replace undef with.