NonNullableStringExtensions extension
Extensions on non-nullable String for common parsing and formatting.
- on
Methods
-
capitalize(
) → String -
Available on String, provided by the NonNullableStringExtensions extension
Capitalizes the first letter of each word and lowercases the rest. -
toCamelCase(
) → String -
Available on String, provided by the NonNullableStringExtensions extension
Convertssnake_caseorkebab-caseto camelCase -
toPascalCase(
) → String -
Available on String, provided by the NonNullableStringExtensions extension
Convertssnake_caseorkebab-caseto PascalCase -
toTryBool(
) → bool? -
Available on String, provided by the NonNullableStringExtensions extension
Tries to parse the string to a boolean, in any letter case. Returns true for 'true', '1' or 'yes', false for 'false', '0' or 'no', and null for anything else. -
toTryDateTime(
{String? inputFormat}) → DateTime? -
Available on String, provided by the NonNullableStringExtensions extension
Tries to parse the string into a DateTime object. -
toTryDouble(
) → double? -
Available on String, provided by the NonNullableStringExtensions extension
Tries to parse the string to a double. Returns null if parsing fails. -
toTryInt(
) → int? -
Available on String, provided by the NonNullableStringExtensions extension
Tries to parse the string to an integer. Returns null if parsing fails.