StringUtils extension
An extention on String with various useful functionality
Convertors such as toCamelCase (camelCase
), toPascalCase (PascalCase
) and toSnakeCase (snake_case
).
Trimmers such as rtrim & ltrim for right and left trim, respectively.
removeExtraSpace to remove any extra white spaces (>1) such as:
" a b c d " => " a b c d "
- on
Properties
- isCamelCase → bool
-
returns
true
ifthis
is ofcamelCase
patternno setter - isPascalCase → bool
-
returns
true
ifthis
is ofPascalCase
patternno setter - isSnakeCase → bool
-
returns
true
ifthis
is ofsnake_case
patternno setter
Methods
-
ltrim(
) → String - trims leading whitespace
-
removeExtraSpace(
) → String - this will remove extra spaces (i.e., > 1 space in sequence);
-
rtrim(
) → String - trims trailing whitespace
-
toCamelCase(
) → String -
toLowerFirst(
) → String -
toPascalCase(
) → String -
toSnakeCase(
) → String -
toUpperFirst(
) → String