3 ms·
"I've heard printf can do this too, but I don't know if that's standardized" It is in POSIX. http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.h
by Someone 11y ago
"I've heard printf can do this too, but I don't know if that's standardized"
It is in POSIX. http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html http://pubs.opengroup.org/onlinepubs/9699919799/functions/pr...:
"Conversions can be applied to the nth argument after the format in the argument list, rather than to the next unused argument. In this case, the conversion specifier character % (see below) is replaced by the sequence "%n$", where n is a decimal integer in the range [1,{NL_ARGMAX}], giving the position of the argument in the argument list. This feature provides for the definition of format strings that select arguments in an order appropriate to specific languages"