StringExtenstions extension

on

Methods

capitalize() String
Capitalize the string eg flutter to Flutter
changeDateStringFormat({String inputPattern, String outputPattern}) String
changes the date formate
chunks(int sizeOfChunks) List<String>
divide String to List
deCapitalize() String
Decapitalize the string eg Flutter to flutter
equalsIgnorecase(String compareTo) bool
compare string in case Insensitive manner
formatDateStringToLocal({String inputPattern, String outputPattern}) String
parse StringDate toLocal date
formatDateStringToUTC({String inputPattern, String outputPattern}) String
format StringDate UTC StringDate
insert({int steps, String valueToInsert}) String
insert string in after specify charssteps
isAlpha() bool
return true if there is only alphabets in string
isAlphaNumeric() bool
return true if there is only alphabets and numeric (no special chars $%^&*)
isEmail() bool
check whether the string is valid email or not
isFloat() bool
return true if string is valid floating value eg 1.2
isHexColor() bool
return true if string is valid hexadecimal color code
isInt() bool
return true if string is valid integer eg 123
isNumeric() bool
return true if there is only numeric values in string eg 12345 or 1.22
isValidPhoneNumber({Country validInCountry}) bool
check whether the string is valid phone number
log() → void
For Logging calls print()
replaceChars({int start: 0, int end, String delimiter: "*"}) String
replace chars from start to end with delimeter eg 12345****10
revers() String
String revers
toCharsList() List<String>
convert String to list of Chars
toDate({String format}) DateTime
parse String to DateTime
toDouble() double
parse string to Double
toHexColor() Color
parse string hexadecimal color to color object
toInt() int
parse string to Int
toJsonMap() Map<String, dynamic>
parse string to Json map<String,Dynamic>