StringUtilities extension
- on
Methods
-
after(
String string) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string after a string. -
afterFirst(
String string) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string after the first occurrence of a string. -
afterLast(
String string) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string after the last occurrence of a string. -
append(
String string) → String -
Available on String?, provided by the StringUtilities extension
Append a string. -
before(
String string) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string before a string. -
beforeFirst(
String string) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string before the first occurrence of a string. -
beforeLast(
String string) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string before the last occurrence of a string. -
between(
String start, String end) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string between two strings. -
betweenFirst(
String start, String end) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string between the first occurrence of two strings. -
betweenLast(
String start, String end) → String -
Available on String?, provided by the StringUtilities extension
Get the substring of a string between the last occurrence of two strings. -
capitalize(
) → String -
Available on String?, provided by the StringUtilities extension
Returns a string with the first character in upper case. -
charCount(
) → int -
Available on String?, provided by the StringUtilities extension
Get the number of characters in a string. -
consonantCount(
) → int -
Available on String?, provided by the StringUtilities extension
Get the number of consonants in a string. -
constantize(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a constant name. -
containsIgnoreCase(
String string) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string contains a substring. -
dropLeft(
int n) → String -
Available on String?, provided by the StringUtilities extension
Drop first n characters from a string. -
dropLeftWhile(
bool condition(String)) → String -
Available on String?, provided by the StringUtilities extension
Drop left while the condition is met. -
dropRight(
int n) → String -
Available on String?, provided by the StringUtilities extension
Drop last n characters from a string. -
dropRightWhile(
bool condition(String)) → String -
Available on String?, provided by the StringUtilities extension
Drop right while the condition is met. -
endsWith(
String string) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string ends with a substring. -
escape(
) → String -
Available on String?, provided by the StringUtilities extension
Escape a string. -
foreignKey(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a foreign key name. -
format(
List< Object> args) → String -
Available on String?, provided by the StringUtilities extension
Format a string. -
formatMap(
Map< String, Object> args) → String -
Available on String?, provided by the StringUtilities extension
Format a string. -
humanize(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a human-readable form. -
isDigits(
) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string contains only digits. -
isEmail(
) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string is a valid email address. -
isHexColor(
) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string is a valid hexadecimal color. -
isPalindrome(
) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string is a palindrome. -
pathize(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a path name. -
pluralize(
) → String -
Available on String?, provided by the StringUtilities extension
Convert a string into plural form. -
prepend(
String string) → String -
Available on String?, provided by the StringUtilities extension
Prepend a string. -
remove(
String string) → String -
Available on String?, provided by the StringUtilities extension
Remve prefix and suffix from a string. -
removePrefix(
String prefix) → String -
Available on String?, provided by the StringUtilities extension
Remve prefix from a string. -
removeSuffix(
String suffix) → String -
Available on String?, provided by the StringUtilities extension
Remve suffix from a string. -
replaceAfterFirst(
String string, String replacement) → String -
Available on String?, provided by the StringUtilities extension
Replace after the first occurrence of a string. -
replaceAfterLast(
String string, String replacement) → String -
Available on String?, provided by the StringUtilities extension
Replace after the last occurrence of a string. -
replaceBeforeFirst(
String string, String replacement) → String -
Available on String?, provided by the StringUtilities extension
Replace before the first occurrence of a string. -
replaceBeforeLast(
String string, String replacement) → String -
Available on String?, provided by the StringUtilities extension
Replace before the last occurrence of a string. -
replaceRange(
int start, int end, String replacement) → String -
Available on String?, provided by the StringUtilities extension
Replace range of characters. -
sentenceCount(
) → int -
Available on String?, provided by the StringUtilities extension
Get the number of sentences in a string. -
sequenceize(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a sequence name. -
startsWith(
String string) → bool -
Available on String?, provided by the StringUtilities extension
Check if a string starts with a substring. -
syllableCount(
) → int -
Available on String?, provided by the StringUtilities extension
Get the number of syllables in a string. -
tableize(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a table name. -
titleCase(
) → String -
Available on String?, provided by the StringUtilities extension
Capitalizes the first character of each word in a string. -
toBase64(
) → String -
Available on String?, provided by the StringUtilities extension
-
toBytes(
) → List< int> -
Available on String?, provided by the StringUtilities extension
Convert string to bytes. -
toCamelCase(
) → String -
Available on String?, provided by the StringUtilities extension
Convert string to camel case. -
toColor(
) → Color? -
Available on String?, provided by the StringUtilities extension
Convert to color from hex string. Returns null if the string is not a valid hex color. -
toDotCase(
) → String -
Available on String?, provided by the StringUtilities extension
Convert string to dot case. -
toHtmlText(
) → String -
Available on String?, provided by the StringUtilities extension
Convert to HTML Text. -
toKebabCase(
) → String -
Available on String?, provided by the StringUtilities extension
Convert string to kebab case. -
toPascalCase(
) → String -
Available on String?, provided by the StringUtilities extension
Convert string to pascal case. -
toSnakeCase(
) → String -
Available on String?, provided by the StringUtilities extension
Convert string to snake case. -
toTrainCase(
) → String -
Available on String?, provided by the StringUtilities extension
Convert string to train case. -
uncapitalize(
) → String -
Available on String?, provided by the StringUtilities extension
Returns a string with the first character in lower case. -
underscore(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a camelized string into all lower case separated by underscores. -
variablize(
) → String -
Available on String?, provided by the StringUtilities extension
Converts a string into a variable name. -
vowelCount(
) → int -
Available on String?, provided by the StringUtilities extension
Get the number of vowels in a string. -
wordCount(
) → int -
Available on String?, provided by the StringUtilities extension
Get the number of words in a string.