T Function Reference - sprintf

str_sprintf

Format a string

Formats a string using C-style format specifiers. Supports %s (string), %d (integer), %f (float), and %% (literal %).

Parameters

Returns:

Returns: The formatted string.

Examples

str_sprintf("Hello, %s!", "world")
-- Returns = "Hello, world!"
str_sprintf("Value = %d", 42)
-- Returns: "Value = 42"