Strings extension
Provides functions that manipulate Strings.
- on
Properties
- isBlank → bool
-
Whether this is comprised of only whitespaces.
no setter
- isLowerCase → bool
-
Whether this is comprised of only uppercase characters.
no setter
- isNotBlank → bool
-
Whether this string is not comprised of only whitespaces.
no setter
- isUpperCase → bool
-
Whether this is comprised of only uppercase characters.
no setter
-
lines
→ Iterable<
String> -
Lazily splits this into individual lines.
no setter
Methods
-
capitalize(
) → String - Capitalizes the first character.
-
equalsIgnoreCase(
String other) → bool -
Returns
true
if this andother
are equal, ignoring capitalization. -
matches(
Pattern pattern) → bool -
Returns
true
if this matchespattern
. -
toCamelCase(
[Pattern? separators]) → String - Camel-cases this string.
-
toKebabCase(
[Pattern? separators]) → String - Kebab-cases this string.
-
toPascalCase(
[Pattern? separators]) → String - Pascal-cases this string.
-
toScreamingCase(
[Pattern? separators]) → String - Screaming-cases this string.
-
toSentenceCase(
[Pattern? separators]) → String - Sentence-cases this string.
-
toSnakeCase(
[Pattern? separators]) → String - Snake-cases this string.
-
toTitleCase(
[Pattern? separators]) → String - Title-cases this string.
Static Properties
- partialWordSeparators → Pattern
-
A subset of wordSeparators that do not separate consecutive uppercase characters.
final
- wordSeparators → Pattern
-
The default separators recognized by toCamelCase and other related functions.
final