String Utils¶
Functions¶
formatStr¶
Creates a string containing the provided arguments based on the specified format string.
Format String
Formatting a value is done by specifying {} as part of the format string, or {<options>} where <options> varies based on the type being formatted.
Positional argument formatting can also be done via {<argument number>} where {0} represents the first argument, {1} the second and so on.
See fmtlib for more information on the available format string options.
Warning
Only elementary types (numbers, strings, booleans, and nil) are supported.
Other types, such as tables and functions, get formatted as the underlying type name where available.
| Parameter | Type | Description |
|---|---|---|
| format | String | String representing the desired output format. |
| args | ... | Values to format. |
| Returns | Description |
|---|---|
| String | Formatted output obtained based on the provided format string and arguments. |