UtilityString extension

on

Properties

asciiWords List<String>
Returns list of ascii words from the string
no setter
camelCase String
Converts the string to camelCase.
no setter
capitalize String?
Converts the first character of string to upper case and the remaining to lower case.
no setter
deburr String
Converts string from Latin-1 to normal basic latin letters
no setter
enumVal String?
Returns the value of the enum
no setter
hasUnicodeWord bool
Returns true if string contains any occurence of unicode word other-wise false
no setter
isBinary bool
returns true if the string is binary, other-wise false
no setter
isDecimal bool
returns true if the string is decimal, other-wise false
no setter
isHex bool
returns true if the string is good hex, other-wise false
no setter
isNumber bool
returns true, if the string is number other-wise false
no setter
isOctal bool
returns true if the string is octal, other-wise false
no setter
lowerFirst String?
Converts the first character of string to lower case.
no setter
toNumber num?
Trims the value and then converts it to number
no setter
unicodeWords List<String>
Returns list of unicode words from the string
no setter
upperFirst String
Converts the first character of string to upper case.
no setter

Methods

count(String value, [bool caseSensitive = true]) int
Counts the number of occurrences of value.
kebabCase({String separator = '-'}) String
Converts the string to kebabCase.
lowerCase({String separator = ' '}) String
Converts the string to lowerCase.
nameCase({String separator = ' '}) String
Converts the string to nameCase.
pad(int length, [String chars = ' ']) String
Pads the string on the left and right sides if it's shorter than length.
repeat([int n = 1]) String
returns repeated string, n number of times
slice(int start, [int? end]) String
Creates a slice of string from start up to, but not including, end.
snakeCase({String separator = '_'}) String
Converts the string to snakeCase.
words([RegExp? pattern]) List<String?>
returns list of words