modules/string/main library

Functions

camelCase(String string) String
Converts string to camel case.
capitalize(String string) String
Converts the first character of String to upper case and the remaining to lower case.
deburr(String str) String
Deburrs String by converting Latin-1 Supplement and Latin Extended-A letters to basic Latin letters and removing combining diacritical marks.
kebabCase(String string) String
Converts String to kebab case.
lowerCase(String string) String
Converts String, as space separated words, to lower case.
lowerFirst(String string) String
Converts the first character of string to lower case.
replace(String string, dynamic pattern, dynamic replacement) String
Replaces occurrences of pattern in string with replacement. Returns the modified string.
startsWith(String string, String target, [int position = 0]) bool
Checks if string starts with the given target string.
toLower([String string = '']) String
Converts a string, as a whole, to lowercase.
toUpper([String string = '']) String
Converts a string, as a whole, to uppercase.
trimEnd(String str, [String chars = ' ']) String
Removes trailing whitespace or specified characters from string.
trimStart(String string, [String chars = ' ']) String
Removes leading whitespace or specified characters from string.
unescape([String string = '']) String
The inverse of _.escape; this method converts the HTML entities &, <, >, ", and ' in string to their corresponding characters
upperCase([String string = '']) String
Converts string, as space separated words, to upper case.
upperFirst([String string = '']) String
words({required String string, RegExp? pattern, bool guard = false}) List<String>
Splits String into an array of its words.