StringExtensions extension
- on
Methods
-
capitalize(
) → String -
Available on String, provided by the StringExtensions extension
Capitalizes the first letter of the string. -
containsDigit(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string contains at least one digit. -
containsLowercase(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string contains at least one lowercase letter. -
containsUppercase(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string contains at least one uppercase letter. -
isAlphabetic(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string contains only alphabetic characters. -
isEmail(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string is a valid email. -
isNullOrWhiteSpace(
) → bool -
Available on String, provided by the StringExtensions extension
Returns true if the string is null, empty, or contains only whitespace. -
isNumeric(
) → bool -
Available on String, provided by the StringExtensions extension
Returns true if the string contains only numeric characters. -
isPhoneNumber(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string is a valid phone number (basic check). -
isUrl(
) → bool -
Available on String, provided by the StringExtensions extension
Checks if the string is a valid URL. -
removeWhitespace(
) → String -
Available on String, provided by the StringExtensions extension
Removes all whitespace from the string. -
reverse(
) → String -
Available on String, provided by the StringExtensions extension
Returns a reversed version of the string. -
toTitleCase(
) → String -
Available on String, provided by the StringExtensions extension
Converts the string to Title Case. -
truncate(
int maxLength, {String ellipsis = '...'}) → String -
Available on String, provided by the StringExtensions extension
Shortens the string to a specified length with an optional ellipsis.