DHUCaseConversionExtensions extension

String case conversion helpers.

on

Properties

capitalizeFirstLetter String

Available on String, provided by the DHUCaseConversionExtensions extension

Capitalizes only the first letter of the string, preserving the rest of the case. Example: "flutter AND DART" => "Flutter AND DART"
no setter
capitalizeFirstLowerRest String

Available on String, provided by the DHUCaseConversionExtensions extension

Capitalizes the first letter of the string and lowers the rest. Example: "FLUTTER AND DART" => "Flutter and dart"
no setter
lowercaseFirstLetter String

Available on String, provided by the DHUCaseConversionExtensions extension

Lowercases only the first letter of the string, preserving the rest of the case. Example: "FLUTTER AND DART" => "fLUTTER AND DART"
no setter
shouldIgnoreCapitalization bool

Available on String, provided by the DHUCaseConversionExtensions extension

Determines if capitalization should be ignored for this string. Returns true if the string starts with a number or is a common lowercase word in titles.
no setter
toCamelCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to camelCase (dromedaryCase). Example: "hello_world" => "helloWorld"
no setter
toCamelKebabCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to camel-Kebab-Case. Example: "helloWorld" => "hello-World"
no setter
toCamelSnakeCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to camel_Snake_Case. Example: "helloWorld" => "hello_World"
no setter
toDotCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to dot.case. Example: "helloWorld" => "hello.world"
no setter
toFlatCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to flatcase. Example: "HelloWorld" => "helloworld"
no setter
toKebabCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to kebab-case (dash-case, lisp-case, spinal-case). Example: "helloWorld" => "hello-world"
no setter
toPascalCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to PascalCase (UpperCamelCase). Example: "hello_world" => "HelloWorld"
no setter
toPascalKebabCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to Pascal-Kebab-Case. Example: "helloWorld" => "Hello-World"
no setter
toPascalSnakeCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to Pascal_Snake_Case. Example: "helloWorld" => "Hello_World"
no setter
toScreamingCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to SCREAMINGCASE (UPPERCASE). Example: "helloWorld" => "HELLOWORLD"
no setter
toScreamingKebabCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to SCREAMING-KEBAB-CASE (COBOL-CASE). Example: "helloWorld" => "HELLO-WORLD"
no setter
toScreamingSnakeCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to SCREAMING_SNAKE_CASE (MACRO_CASE, CONSTANT_CASE, ALL_CAPS). Example: "helloWorld" => "HELLO_WORLD"
no setter
toSnakeCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to snake_case (snail_case, pothole_case). Example: "helloWorld" => "hello_world"
no setter
toTitle String

Available on String, provided by the DHUCaseConversionExtensions extension

Capitalizes the first letter of each word in the string while maintaining the -, _, and space characters.
no setter
toTitleCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to Title Case. Example: "hello_world" => "Hello World"
no setter
toTrainCase String

Available on String, provided by the DHUCaseConversionExtensions extension

Converts the string to Train-Case (HTTP-Header-Case). Example: "helloWorld" => "Hello-World"
no setter
toWords List<String>

Available on String, provided by the DHUCaseConversionExtensions extension

Splits the string into a list of words based on camel case, underscores, hyphens, and spaces.
no setter