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
- renderHtml → String
-
Render a HTML String
no setter
- reverse → String
-
Get Color from HEX Stringz
It reverses the String
no setter
Methods
-
calculateReadTime(
{int wordsPerMinute = 200}) → double - Return average read time duration of given String in seconds
-
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 seperator = ','}) → String - for ex. add comma in price
-
getNumericOnly(
{bool aFirstWordOnly = false}) → String - toast a String Returns only numbers from a string trim Whitespaces
-
getYouTubeThumbnail(
{bool trimWhitespaces = true}) → String - Returns YouTube thumbnail for given video id
-
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
-
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
andendPattern
-
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
-
validatePhone(
) → bool - Check phone validation
-
validateURL(
) → bool - Check URL validation