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

NameTypeOptionalDescription
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

NameTypeDescription
result string The formatted string.

Properties

KeyTypeDefaultDescription
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".

  1. Connect Player Get Location to get x, y, z
  2. Set format to "X: {0} Y: {1} Z: {2}"
  3. Connect x → arg0, y → arg1, z → arg2