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):

  • UpperUPPER CASE
  • Lowerlower case
  • TitleTitle 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")
  • CamelcamelCase
  • Pascal / UpperCamelPascalCase
  • Snakesnake_case
  • UpperSnakeSCREAMING_SNAKE_CASE
  • Kebabkebab-case
  • UpperKebabUPPER-KEBAB-CASE
  • TrainTrain-Case
  • Flatflatcase
  • UpperFlatUPPERFLATCASE.

Input

Stringrequired
Text to re-case.

Output

String
The re-cased text.