Data / Strings
data/string_format
String Format
Builds a string from a format template, replacing {0}–{3} with input arguments.
Note: Any argument not connected is replaced with an empty string.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
arg0 |
any | ✓ | Replaces {0} in the format string. |
arg1 |
any | ✓ | Replaces {1} in the format string. |
arg2 |
any | ✓ | Replaces {2} in the format string. |
arg3 |
any | ✓ | Replaces {3} in the format string. |
Outputs
| Name | Type | Description |
|---|---|---|
result |
string | The formatted string. |
Properties
| Key | Type | Default | Description |
|---|---|---|---|
format |
string | "Hello {0}!" |
Use {0}, {1}, {2}, {3} as placeholders. |
Examples
Player coordinates
Format a player's coordinates as "X: 100 Y: 64 Z: -50".
- Connect Player Get Location to get x, y, z
- Set format to "X: {0} Y: {1} Z: {2}"
- Connect x → arg0, y → arg1, z → arg2