StringExtension extension
- on
Properties
- date → DateTime?
-
Available on String?, provided by the StringExtension extension
Returns DateTime if string is a date string like "2025-01-01 12:00:00"no setter - dateOnly → DateTime?
-
Available on String?, provided by the StringExtension extension
Returns DateTime if string is a date string like "2025-01-01"no setter - ipv4Tov6 → String?
-
Available on String?, provided by the StringExtension extension
Convert an IPv4 address to an IPv6 address,no setter - ipv6Tov4 → String?
-
Available on String?, provided by the StringExtension extension
Convert an IPv6 address to an IPv4 address,no setter - isChineseFullName → bool
-
Available on String?, provided by the StringExtension extension
Returnstrueifnameis a valid Chinese full name.no setter - isChineseIdNumber → bool
-
Available on String?, provided by the StringExtension extension
Returnstrueifidis a valid Chinese resident ID number.no setter - isCreditCard → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid credit card numberno setter - isDate → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a dateno setter - isDEANumberOfUS → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid US Drug Enforcement Agencyno setter - isEmail → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid email addressno setter - isEmpty → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is null or emptyno setter - isIPAddress → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid IPv4 or IPv6 addressno setter - isIPv4 → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid IPv4 addressno setter - isIPv6 → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid IPv6 addressno setter - isJson → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid JSON stringno setter - isNotEmpty → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is not emptyno setter - isNumeric → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid numberno setter - isPhoneNumberOfUS → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid US Phone Numberno setter - isQuery → bool
-
Available on String?, provided by the StringExtension extension
Validates URL query string (handles ? & # fragments, allows empty values)no setter - isSSNofUS → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid US Society Security Numberno setter - isStrongPassword → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string match strong password requirementsno setter - isTime → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a timeno setter - isUrl → bool
-
Available on String?, provided by the StringExtension extension
Returns true if string is a valid urlno setter - time → Time?
-
Available on String?, provided by the StringExtension extension
Returns Time if string is a time string like "12:00:00"no setter - timeOnly → Time?
-
Available on String?, provided by the StringExtension extension
Returns Time if string is a time string like "12:00:00"no setter
Methods
-
bytes(
) → List< int> -
Available on String?, provided by the StringExtension extension
Returns a list of the UTF-16 code units of the string. -
bytesChunks(
int chunkSize) → List< List< int> > -
Available on String?, provided by the StringExtension extension
Splits the string's UTF-16 code units (bytes) into a list of chunks. -
bytesCount(
) → int -
Available on String?, provided by the StringExtension extension
Calculates the byte count of a string, treating non-ASCII characters as 2 bytes. -
capitalize(
) → String -
Available on String?, provided by the StringExtension extension
Returns string with capitalized first letter -
chunks(
int chunkSize) → List< String> -
Available on String?, provided by the StringExtension extension
Splits the string into a list of chunks of a specified size. -
isValidFileExtension(
[List< String> ? allowed]) → bool -
Available on String?, provided by the StringExtension extension
Returns true if string is a file -
json(
) → dynamic -
Available on String?, provided by the StringExtension extension
Returns JSON object if string is a valid JSON string -
numeric(
) → double? -
Available on String?, provided by the StringExtension extension
Returns double 0.564 from string percentage like "56.4%" Parsesourceas a double literal and return its value. -
toCamelCase(
) → String -
Available on String?, provided by the StringExtension extension
Converts a string from snake_case or kebab-case to camelCase. -
toSnakeCase(
{String separator = '_'}) → String -
Available on String?, provided by the StringExtension extension
Converts a string from camelCase to snake_case.