|
|
int nl_printf (format [, arg...]) char *format;int nl_fprintf (stream, format [, arg...]) FILE *stream; char *format;
int nl_sprintf (s, format [, arg...]) char *s, *format;
The conversion character % in the format string is replaced by the sequence %digit$, where digit is a decimal digit n in the range (1-{ NL_ARGMAX }) (see limits(FP)). Conversions are applied to the nth argument in the argument list, rather than to the next unused argument.
The format passed to these functions can contain either form of conversion specification, namely % or %digit$, although the two forms cannot be mixed within a single format string. The format string should contain values for all the arguments specified in the argument list. The asterisk, *, cannot be used to indicate a field width in the format string.
nl_printf(format, weekday, month, day, hour, min);For American usage, format could be a pointer to the string:
"%1$s, %2$s %3$d, $4$d:%5$.2d\n"This would produce the following message:
Sunday, July 3, 10:02For German usage, format could be a pointer to the string:
"%1$s, %3$d. %2$s, $4$d:%5$.2d\n"This would produce the message:
Sonntag, 3. Juli, 10:02