void doFormat(void delegate(dchar) putc, TypeInfo[] arguments, va_list argptr)
|
Interprets variadic argument list pointed to by argptr whose types are given by arguments[, formats them according to embedded format strings in the variadic argument list, and sends the resulting characters to putc. Mismatched arguments and formats result in a FormatError being thrown.
The variadic arguments are consumed in order. Each is formatted into a sequence of chars, using the default format specification for its type, and the characters are sequentially passed to putc. If a char[, wchar[, or dchar[ argument is encountered, it is interpreted as a format string. As many arguments as specified in the format string are consumed and formatted according to the format specifications in that string and passed to putc. If there are too few remaining arguments, a FormatError is thrown. If there are more remaining arguments than needed by the format specification, the default processing of arguments resumes until they are all consumed.
Any strings used as formats or that are output, and any characters, must be valid UTF characters.
|