Skip to main content

Text: Text Case

Re-case a string into a chosen casing convention. Names follow the convert_case crate's vocabulary.

Example
Mode: Snake → "Hello World" → "hello_world"
Mode: Camel → "hello world" → "helloWorld"
Mode: Pascal → "hello world" → "HelloWorld"
Mode: Kebab → "Hello World" → "hello-world"

Parameters​

Case mode

Casing strategy to apply (default: Upper):

  • Upper — UPPER CASE
  • Lower — lower case
  • Title — Title Case
  • Toggle — first letter of each word lowercase, the rest uppercase ("Toggle Case" → "tOGGLE cASE")
  • Alternating — letters alternate lower/upper, restarting lowercase at each word ("Alternating Case" → "aLtErNaTiNg cAsE")
  • Camel — camelCase
  • Pascal / UpperCamel — PascalCase
  • Snake — snake_case
  • UpperSnake — SCREAMING_SNAKE_CASE
  • Kebab — kebab-case
  • UpperKebab — UPPER-KEBAB-CASE
  • Train — Train-Case
  • Flat — flatcase
  • UpperFlat — UPPERFLATCASE.

Input​

Stringrequired
Text to re-case.

Output​

String
The re-cased text.