StringExt extension
String extensions to add useful utility methods.
- on
Properties
Methods
-
capitalize(
) → String - Capitalizes each word in the string.
-
capitalizeFirst(
) → String - Capitalizes only the first letter of the string.
-
hasMatch(
String pattern) → bool -
Available on String, provided by the StringExt extension
Checks whether the string matches a given regexpattern
. -
isBool(
{bool caseSensitive = true}) → bool - Checks if the string represents a boolean value.
-
isDouble(
) → bool - Checks if the string represents a double value.
-
isInt(
) → bool - Checks if the string represents an integer value.
-
isNum(
) → bool - Checks if the string represents a numeric value.
-
removeAllWhitespace(
) → String - Removes all whitespace from the string.
-
toBool(
{bool caseSensitive = true}) → bool - Converts the string into a boolean value.
-
toDouble(
) → double - Converts the string into a double.
-
toInt(
) → int - Converts the string into an integer.
-
toNum(
) → num - Converts the string into a numeric value.