StringTransformation extension

on

Properties

last String
Returns the last symbol in string
no setter

Methods

capitalizeFirst() String
Capitalizes first symbol of string
removeAllWhiteSpace() String?
Removes all whitespaces from string
replaceAfter(String delimiter, String replacement, [String? defaultValue]) String?
Replaces part of string after the first occurrence of given delimiter with the replacement string. If the string does not contain the delimiter, returns defaultValue which defaults to the original string.
replaceBefore(String delimiter, String replacement, [String? defaultValue]) String?
Replaces part of string before the first occurrence of given delimiter with the replacement string. If the string does not contain the delimiter, returns missingDelimiterValue which defaults to the original string.
reversed() String
Returns the reversed string
toDouble() double
Converts string to double or throws FormatException
toDoubleOrNull() double?
Converts string to double or returns null
toInt() int
Converts string to int or throws FormatException
toIntOrNull() int?
Converts string to int or returns null