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