Function | Defined by | ||
---|---|---|---|
sprintf(format:String, ... args):String
An sprintf implementation in ActionScript 3.
| de.popforge.utils |
sprintf | () | function |
public function sprintf(format:String, ... args):String
An sprintf implementation in ActionScript 3.
Supported specifiers: cdieEfgGosuxX
Supported flags: +-(space)#0
Supported width: (number); /code>
Supported precision:
.(number); ./code>
Supported length: h
Unsupported parts like length L (long double) will be removed.
Each formatter is following the layout %[flags][width][.precision][length]specifier
.
format:String — String that containts the text to format.
It can optionally contain embedded format tags that are
substituted by the values specified in subsequent argument(s)
and formatted as requested.
The number of arguments following the format parameters should
at least be as much as the number of format tags.
The format tags follow C's sprintf() layout.
|
|
... args — Depending on the format string, the function may expect a sequence of additional arguments, each containing one value to be inserted instead of each %-tag specified in the format parameter, if any.
There should be the same number of these arguments as the number
of %-tags that expect a value.
|
String — The formatted string.
|
— If the format string is malformed (e.g. containing invalid characters)
|
See also