StringExtension extension

on

Properties

isApk bool
Document regex
no setter
isAudio bool
Audio regex
no setter
isDoc bool
Document regex
no setter
isEmptyOrNull bool
Returns true if given String is null or isEmpty
no setter
isExcel bool
Excel regex
no setter
isHtml bool
HTML regex
no setter
isImage bool
Image regex
no setter
isInt bool
no setter
isPdf bool
PDF regex
no setter
isPPT bool
PPT regex
no setter
isTxt bool
Txt regex
no setter
isVideo bool
Video regex
no setter
reverse String
It reverses the String
no setter

Methods

capitalizeFirstLetter() String
Capitalize given String
convertYouTubeUrlToId({bool trimWhitespaces = true}) String
Get YouTube Video ID
copyToClipboard() Future<void>
countWords() int
Return number of words ina given String
formatNumberWithComma() String
for ex. add comma in price
getNumericOnly(String string, {bool aFirstWordOnly = false}) String
Returns only numbers from a string trim Whitespaces
getYouTubeThumbnail() String
Returns YouTube thumbnail for given video id
hasMatch(String? s, String p) bool
isAlpha() bool
Check weather String is alpha or not
isDigit() bool
Return true if given String is Digit
isJson() bool
removeAllWhiteSpace() String
Removes white space from given String
repeat(int n, {String separator = ''}) String
Returns the given string n times
replaceFarsiNumber(String input) String
setSearchParam() List<String>
returns searchable array for Firebase Database
splitAfter(Pattern pattern) String
Splits from a pattern and returns remaining String after that
splitBefore(Pattern pattern) String
Splits from a pattern and returns String before that
splitBetween(Pattern startPattern, Pattern endPattern) String
It matches the String and returns between startPattern and endPattern
toDouble({double defaultValue = 0.0}) double
Return double value of given string
toInt({int defaultValue = 0}) int
Return int value of given string
toList() List<String>
It return list of single character from String
toSlug({String delimiter = '_'}) String
Generate slug of a given String
toYouTubeId({bool trimWhitespaces = true}) String
Get YouTube Video ID
validate({String value = ''}) String
validateEmail() bool
Check email validation
validateURL() bool
Check URL validation