StringExtension extension
Extension on String providing text formatting, validation, and parsing utilities.
- on
Properties
- base64Only → String
-
Available on String, provided by the StringExtension extension
Removesdata:*/*;base64,from a Data URL.no setter - extractLink → String?
-
Available on String, provided by the StringExtension extension
Extracts URL from this string.no setter - initials → String
-
Available on String, provided by the StringExtension extension
Returns the first two letters.no setter - isEmail → bool
-
Available on String, provided by the StringExtension extension
Returns true if this is a valid email address.no setter - isUrl → bool
-
Available on String, provided by the StringExtension extension
Returns true if this is a valid url.no setter - normalizeCurrency → String
-
Available on String, provided by the StringExtension extension
Normalizes currency symbol (e.g NGN -> ₦, USD -> $)no setter - withoutNumbersAndSpaces → String
-
Available on String, provided by the StringExtension extension
Returns this string without numbers and white spaces.no setter - withoutSymbols → String
-
Available on String, provided by the StringExtension extension
Returns this string without special characters and symbols.no setter
Methods
-
toCurrency(
[String symbol = '\$']) → String -
Available on String, provided by the StringExtension extension
Currency formatter. -
toTitleCase(
) → String -
Available on String, provided by the StringExtension extension
Formats text to title case. -
truncate(
[int maxLength = 90]) → String -
Available on String, provided by the StringExtension extension
Truncates string with ellipsis, collapses multiple spaces to one.