StringUtils extension

on

Properties

getTextSize Size
no setter
isEmptyOrNull bool
Return a bool if the string is null or empty
no setter

Methods

equalsIgnoreCase(String? other) bool
getFirstChart() String
Lấy giá trị đầu tiên của chuỗi
hasCapitalletter() bool
Kiểm tra string tất cả là chữ hoa
hasMatch(String? value, String pattern) bool
isAlphabetOnly() bool
Checks if string consist only Alphabet. (No Whitespace)
isAudio(String filePath) bool
Kiểm tra string là audio file
isCurrency() bool
kiểm tra string là tiền
isEmail() bool
Kiểm tra string là email
isHTML(String filePath) bool
Kiểm tra string là html file
isImage(String filePath) bool
Kiểm tra string là image file
isNumericOnly() bool
isPhoneNumber() bool
kiểm tra string là số điện thoại
isUsername() bool
Kiểm tra string là username
isVideo(String filePath) bool
Kiểm tra string là video file
printThis() → void
prints to console this text if it's not empty or null
removeAllWhiteSpace() String?
Returns a String without white space at all
replaceAfter(String delimiter, String replacement, [String? defaultValue = '']) String?
Replace 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?
Replace 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.
toDoubleOrNull() double?
Parses the string as an double or returns null if it is not a number.
toIntOrNull() int?
Parses the string as an int or returns null if it is not a number.