ExtensionString extension
- on
Methods
-
isAlphabetOnly(
String s) → bool - Checks if string consist only Alphabet. (No Whitespace)
-
isApk(
) → bool - Checks if string is APK file path.
-
isAudio(
) → bool - Checks if string is audio file path.
-
isBool(
) → bool - Checks if string is boolean.
-
isCamelCase(
) → bool - Checks if string value is camelcase.
-
isCapitalize(
{bool firstOnly = false}) → bool - Checks if string value is capitalize.
-
isCaseInsensitiveContains(
String compareTo) → bool - Checks if a contains b (Treating or interpreting upper- and lowercase letters as being the same).
-
isCaseInsensitiveContainsAny(
String compareTo) → bool - Checks if a contains b or b contains a (Treating or interpreting upper- and lowercase letters as being the same).
-
isDateTime(
) → bool - Checks if string is DateTime (UTC or Iso8601).
-
isDocument(
) → bool - Checks if string is Doc file path.
-
isEmail(
{int? minLength, int? maxLength}) → bool - Checks if string is email.
-
isExcel(
) → bool - Checks if string is Excel file path.
-
isHTML(
) → bool - Checks if string is html file path.
-
isImage(
) → bool - Checks if string is image file path.
-
isIPv4(
) → bool - Checks if string is IPv4.
-
isIPv6(
) → bool - Checks if string is IPv6.
-
isLengthBetween(
int minLength, int maxLength) → bool - Checks if length of string is BETWEEN minLength to maxLength.
-
isLengthEqualTo(
int maxLength) → bool - Checks if length of string is EQUAL than maxLength.
-
isLengthGreaterOrEqual(
int maxLength) → bool - Checks if length of string is GREATER OR EQUAL to maxLength.
-
isLengthGreaterThan(
int maxLength) → bool - Checks if length of string is GREATER than maxLength.
-
isLengthLowerOrEqual(
int maxLength) → bool - Checks if length of string is LOWER OR EQUAL to maxLength.
-
isLengthLowerThan(
int maxLength) → bool - Checks if length of string is LOWER than maxLength.
-
isMD5(
) → bool - Checks if string is MD5
-
isNull(
) → bool - Checks if data is null.
-
isNullOrBlank(
) → bool - Checks if data is null or Blank (empty or only contains whitespace).
-
isNum(
) → bool - Checks if string is num (int or double).
-
isNumericOnly(
) → bool - Checks if string is numeric only. Numeric only doesnt accepting "." which double data type have
-
isOneAKind(
) → bool - Checks if all character inside string are same. Example: 111111 -> true, wwwww -> true
-
isPalindrom(
) → bool - Checks if string is Palindrom.
-
isPDF(
) → bool - Checks if string is PDF file path.
-
isPPT(
) → bool - Checks if string is powerpoint file path.
-
isSHA1(
) → bool - Checks if string is SHA251.
-
isSHA256(
) → bool - Checks if string is SHA256.
-
isTxt(
) → bool - Checks if string is txt file path.
-
isURL(
) → bool - Checks if string is URL.
-
isVector(
) → bool - Checks if string is vector image file path.
-
isVideo(
) → bool - Checks if string is video file path.
-
toBinary(
{bool nullOnError = false}) → String? - Transform string value to binary Example: 15 => 1111
-
toBool(
{bool falseOnError = false}) → bool - Transform string to boolean type
-
toCamelCase(
) → String? - Capitalize each word inside string Example: your name => yourName
-
toCapitalize(
{bool firstOnly = false}) → String? - Capitalize each word inside string Example: your name => Your Name, your name => Your name
-
toDateTime(
) → DateTime? - Transform String millisecondsSinceEpoch (DateTime) to DateTime
-
toDouble(
{bool nullOnError = false}) → double? - Transform string to double type
-
toInt(
{bool nullOnError = false}) → int? - Transform string to int type
-
toNum(
{bool nullOnError = false}) → num? - Transform string to num type
-
toNumericOnly(
) → String - Extract numeric value of string Example: OTP 12312 27/04/2020 => 1231227042020ß If firstword only is true, then the example return is "12312" (first found numeric word)