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. Returns true if string is 'true' (case-insensitive) or '1', false otherwise. -
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.