DHUCaseConversionExtensions extension

on

Properties

capitalizeFirstLetter String
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
Capitalizes the first letter of the string and lowers the rest. Example: "FLUTTER AND DART" => "Flutter and dart"
no setter
lowercaseFirstLetter String
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
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
Converts the string to camelCase (dromedaryCase). Example: "hello_world" => "helloWorld"
no setter
toCamelKebabCase String
Converts the string to camel-Kebab-Case. Example: "helloWorld" => "hello-World"
no setter
toCamelSnakeCase String
Converts the string to camel_Snake_Case. Example: "helloWorld" => "hello_World"
no setter
toDotCase String
Converts the string to dot.case. Example: "helloWorld" => "hello.world"
no setter
toFlatCase String
Converts the string to flatcase. Example: "HelloWorld" => "helloworld"
no setter
toKebabCase String
Converts the string to kebab-case (dash-case, lisp-case, spinal-case). Example: "helloWorld" => "hello-world"
no setter
toPascalCase String
Converts the string to PascalCase (UpperCamelCase). Example: "hello_world" => "HelloWorld"
no setter
toPascalKebabCase String
Converts the string to Pascal-Kebab-Case. Example: "helloWorld" => "Hello-World"
no setter
toPascalSnakeCase String
Converts the string to Pascal_Snake_Case. Example: "helloWorld" => "Hello_World"
no setter
toScreamingCase String
Converts the string to SCREAMINGCASE (UPPERCASE). Example: "helloWorld" => "HELLOWORLD"
no setter
toScreamingKebabCase String
Converts the string to SCREAMING-KEBAB-CASE (COBOL-CASE). Example: "helloWorld" => "HELLO-WORLD"
no setter
toScreamingSnakeCase String
Converts the string to SCREAMING_SNAKE_CASE (MACRO_CASE, CONSTANT_CASE, ALL_CAPS). Example: "helloWorld" => "HELLO_WORLD"
no setter
toSnakeCase String
Converts the string to snake_case (snail_case, pothole_case). Example: "helloWorld" => "hello_world"
no setter
toTitle String
Capitalizes the first letter of each word in the string while maintaining the -, _, and space characters.
no setter
toTitleCase String
Converts the string to Title Case. Example: "hello_world" => "Hello World"
no setter
toTrainCase String
Converts the string to Train-Case (HTTP-Header-Case). Example: "helloWorld" => "Hello-World"
no setter
toWords List<String>
Splits the string into a list of words based on camel case, underscores, hyphens, and spaces.
no setter