tcng currently only has one function: the formatted output function sprintf that returns a string, like the function with the same name in Perl.
The usage is like in C or Perl, and the following components are recognized in a conversion specification (see section B1.2 of [KR88] for further details):
- for left adjustment
0 for leading zeroes
*
f or s: the
precision, or *
d, u, o, x,
X, f, c, s, and %
When using the conversion character %, the whole specification
must be %%.
Example:
$tag = "item"+sprintf("%04d",$number);