VxStringExtension extension

Extension Methods & Widgets for the strings

on

Properties

capitalized String
from 'foo' to 'Foo'
no setter
eliminateFirst String
Removes first element
no setter
eliminateLast String
Removes last element
no setter
isEmpty bool
Return a bool if the string is null or empty
no setter
isJsonDecodable bool
Check if string is json decodable
no setter
isNotBlank bool
Returns true if s is neither null, empty nor is solely made of whitespace characters.
no setter
lowerCamelCase String
From 'foo_bar' to 'fooBar'
no setter
numCurrency String
Format numeric currency
no setter
orEmpty String
Returns the string if it is not null, or the empty string otherwise
no setter
richText VxRichText
Get RichText Widget for the String
no setter
selectableText VxSelectableTextBuilder
Get SelectableText Widget for the String
no setter
snakeCase String
from fooBar to foo_bar
no setter
text VxTextBuilder
Get Text Widget for the String
no setter
textSpan VelocityXTextSpan
Get TextSpan for the String
no setter
toDecodedBase64 String
Base64 decryption
no setter
toEncodedBase64 String
Base64 encryption
no setter
upperCamelCase String
from 'foo_bar' to 'FooBar'
no setter
utf8Encode List<int>
Perform utf8 encoding
no setter
utf8ToList List<int>
utf8ToList
no setter

Methods

allWordsCapitilize() String
Capitalize all words inside a string
compareToIgnoringCase(String other) int
Returns a value according to the contract for Comparator indicating the ordering between this and other, ignoring letter case.
filterChars() String
firstLetterUpperCase() String
Returns first letter of the string as Caps eg -> Flutter
formatDigitPattern({int digit = 4, String pattern = ' '}) String
Add pattern every x bits
formatDigitPatternEnd(String text, {int digit = 4, String pattern = ' '}) String
Add pattern every x bits, starting from the end
hidePartial({int begin = 0, int? end, String replace = '*'}) String?
Replaces chars of the given String s with replace.
ifEmpty(Function action) String
insert(String other, int index) String
Returns a copy of this with other inserted starting at index.
isCreditCardValid() bool
Checks the validity of the credit/debit card number using the Luhn algorithm.
isDigit() bool
Check whether a string is digit or not
isLetter() bool
isNumber() bool
Check whether a string is a number or not
isRtlLanguage() bool
Check if String is Right to Left Language
isSymbol() bool
numCurrencyWithLocale({String locale = "en_US"}) String
Format numeric currency with provided locale
prepend(String other) String
Returns the concatenation of other and this.
removeAllWhiteSpace() String
Returns a String without white space at all "hello world" // helloworld
reverse() String
Returns this with characters in reverse order.
toDate() DateTime?
Convert DateString to DateTime Object
toDateString([String? locale]) String
Converts YYMMDD HH:MM Date to a fully DateString representation, if you need to use locale, dont forget to use initializeDateFormatting in your main() function.
validateEmail() bool
Uses regex to check if the provided string is a valid email address or not