String Transform
Applies various transformations to a string, such as changing its case, trimming whitespace, or reversing it.
Inputs#
| Port | Description |
|---|---|
| The string to transform. | |
| The transformation operation to apply. |
Outputs#
| Port | Description |
|---|---|
| The transformed string. |
Addendum#
Performs a specified transformation on the input string.
Transformation Options#
| Operation | Description | Example (Hello World) |
|---|---|---|
| Casing | ||
lower |
Converts the entire string to lowercase. | hello world |
upper |
Converts the entire string to uppercase. | HELLO WORLD |
title |
Converts the string to title case. | Hello World |
camel |
Converts the string to camelCase. | helloWorld |
pascal |
Converts the string to PascalCase. | HelloWorld |
snake |
Converts the string to snake_case. | hello_world |
kebab |
Converts the string to kebab-case. | hello-world |
| Manipulation | ||
reverse |
Reverses the order of characters in the string. | dlroW olleH |
trim |
Removes whitespace from both ends. | Hello World |
trim_left |
Removes whitespace from the beginning. | Hello World |
trim_right |
Removes whitespace from the end. | Hello World |
ID: core/string-transform@v1