StringExtensions extension

Extension on String to provide additional helper methods and properties.

on

Properties

isEmail bool

Available on String, provided by the StringExtensions extension

Checks if the string is a valid email address.
no setter
isNotNullOrEmpty bool

Available on String, provided by the StringExtensions extension

Checks if the string is not null or empty after trimming whitespace.
no setter
isNullOrEmpty bool

Available on String, provided by the StringExtensions extension

Checks if the string is null or empty after trimming whitespace.
no setter
isPhoneNumber bool

Available on String, provided by the StringExtensions extension

Checks if the string is a valid phone number (supports optional country code).
no setter

Methods

capitalize() String

Available on String, provided by the StringExtensions extension

Capitalizes the first letter of the string.
removeWhitespace() String

Available on String, provided by the StringExtensions extension

Removes all whitespaces from the string.
reverse() String

Available on String, provided by the StringExtensions extension

Reverses the string.
toTitleCase() String

Available on String, provided by the StringExtensions extension

Converts the string to title case by capitalizing each word.