FxString class

Custom string methods

Constructors

FxString()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

concat(String string, String concat) String
Concatenate string with whitespace
count(String str) Map<String, int>
Counts the number of occurrences of string
countBy(String string, String str) int
Counts the number of occurrences of value.
fileExt(String path) String
Get file extension from this
fileName(String path) String
Get file name from this
filePath(String path) String
Get file path without file name from this
isAlphabet(String string) bool
Checks string is letter or not and return bool
isAlphaNumeric(String string) bool
Checks string is Alpha Numerical or not and return bool
isAudio(String string) bool
check string is audio
isCapital(String string) bool
check string is in capital case or not
isCsv(String string) bool
Check file is csv or not
isDoc(String string) bool
Check file is doc or not
isEmail(String string) bool
Checks string is valid email or not and return bool
isEmptyOrNull(String? string) bool
Checks string is empty or null and return bool
isImage(String string) bool
check string is image
isJpg(String string) bool
Check image is jpg or jpeg or not
isLower(String string) bool
check string is in lower case or not
isMobileNumber(String string) bool
Checks string is valid mobile number or not and return bool
isNumber(String string) bool
Checks string is Number or not and return bool
isPDF(String string) bool
Check file is pdf or not
isPng(String string) bool
Check image is png or not
isPPT(String string) bool
Check file is ppt or not
isSentence(String string) bool
check string is in Sentence case or not
isSvg(String string) bool
Check image is svg or not
isTitle(String string) bool
check string is in Title case or not
isTxt(String string) bool
Check file is text or not
isUpper(String string) bool
check string is in upper case or not
isVideo(String string) bool
check string is video
mask(String str, {int upto = 4, String mask = '*'}) String
Replaces all but the last num runes of a string with the specified mask.
maxLen(String string, int max) bool
Check this string max length, if satisfied condition then return true
minLen(String string, int min) bool
Check this string min length, if satisfied condition then return true
range(String string, int min, int max) bool
Check this string length between range, if satisfied condition then return true
regex(String string, String source) bool
match string with regex pattern
removeFirst(String string, [int? upto]) String
Remove first element of string
removeLast(String string, [int? upto]) String
Remove last element of string
removeWhitespace(String string) String
Removes all whitespace
round(String string) int?
Round off double to int if double is string
toCapitalCase(String string) String
Converts all characters in this string to capital case.
toDouble(Object? value) double
Convert string to double
toInt(Object? value) int
Convert string to int
toSentenceCase(String string) String
Capitalize first letter of String and convert rest of string into lower case
toSlug(String string) String
Convert string into slug
toTitleCase(String str) String
Converts all first characters in this string to capital case and rest to the lower case.