StringUtilitiesExtension extension
Utilities for string manipulation and transformation.
- on
Methods
-
elideTo(
int limit) → String -
Available on String, provided by the StringUtilitiesExtension extension
Truncates this string tolimitcharacters, replacing the middle with '...'. -
removePrefixOrSelf(
String prefix) → String -
Available on String, provided by the StringUtilitiesExtension extension
Returns a prefix-removed version if this string starts withprefix, otherwise returns this string unchanged. -
removeSuffix(
String suffix) → String? -
Available on String, provided by the StringUtilitiesExtension extension
Removes thesuffixfrom this string if it ends withsuffix. -
toScreamingSnakeCase(
) → String -
Available on String, provided by the StringUtilitiesExtension extension
Converts camelCase or PascalCase to SCREAMING_SNAKE_CASE.