NAME

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

VERSION

version 0.009

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.

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.