StringExt extension

on

Properties

isAscii bool
Returns true if the string is ASCII encoded.
no setter
isBlank bool
Returns true if this string is empty or consists solely of whitespace characters.
no setter
isCapitalized bool
Returns true if the first character is upper case.
no setter
isDeCapitalized bool
Returns true if the first character is lower case.
no setter
isDouble bool
Returns true if the string can be parsed as a double.
no setter
isInt bool
Returns true if the string can be parsed as an integer.
no setter
isLatin1 bool
Returns true if the string is Latin 1 encoded.
no setter
isLowerCase bool
no setter
isNotBlank bool
Returns true if this char sequence is not empty and contains some characters except of whitespace characters.
no setter
isNotNullOrEmpty bool
Returns true if the string is neither null nor empty.
no setter
isNullOrEmpty bool
Returns true if the string is either null or empty.
no setter
isUpperCase bool
no setter
reversed String
Returns a new string with characters in reversed order.
no setter

Methods

firstLetterCapitalize() String
firstLetterLowercase() String
prefix(String prefix) String
Returns a string with prefix added var value = 'eb'.prefix('D'); print(value); Deb
removePrefix(String prefix) String
removeSuffix(String suffix) String
removeSurrounding({required String prefix, required String suffix}) String
slice(int start, [int end = -1]) String
suffix(String suffix) String
Returns a string with suffix added var value = 'De'.suffix('b'); print(value); Deb
toDouble() double
Parses the string as a double number and returns the result.
toDoubleOrNull() double?
toInt({int? radix}) int
toIntOrNull({int? radix}) int?