string_format [function]
string_format( [int prealloc,] string text, ... )
parses all format specifiers in text
and returns the result
see fmt_text if you don't need the position (argument index) specifications
prealloc
specifies number of bytes to be preallocated on the buffer to avoid continuous reallocations during string generation- the format specifier has the form {<id>:<specifier>} where "id" is the argument index to use and specifier is a fmt_text specifier
- argument indices to be used in specifiers start from 1
print string_format( "{1:d} -> {1:x}", 1337 ); // prints "1337 -> 539"