ModelWorks logoModelWorks
JSON TransformString

toUpperCase

Convert a string to uppercase

toUpperCase

Converts every character of a string to uppercase.

Options

This operation takes no options; pass an empty object or omit options entirely.

Example

Input

JSON
"Hello World"

Operation

JSON
{ "type": "toUpperCase" }

Output

JSON
"HELLO WORLD"

In a Circuit Step

JSON
{
  "name": "shout_label",
  "description": "Uppercase a label for display",
  "function": "circuit.core.transform.json",
  "input": {
    "source": "${{ input.label }}",
    "operations": [
      { "type": "toUpperCase" }
    ]
  },
  "outputs": [
    {
      "name": "shouted_label",
      "description": "Label rendered in uppercase",
      "value": "${{ shout_label.output.transformed_result }}"
    }
  ]
}

Notes & gotchas

  • Errors with toUpperCase: expected string if the input is not a string.
  • Uses Rust's Unicode-aware to_uppercase, which can change byte length.
  • Use toLowerCase for the inverse.
On this page

On this page