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 to limit characters, 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 with prefix, otherwise returns this string unchanged.
removeSuffix(String suffix) String?

Available on String, provided by the StringUtilitiesExtension extension

Removes the suffix from this string if it ends with suffix.
toScreamingSnakeCase() String

Available on String, provided by the StringUtilitiesExtension extension

Converts camelCase or PascalCase to SCREAMING_SNAKE_CASE.