 |
snprintf |
Function (tigcc.a) |
Sends formatted output, up to a given length, to a string.
snprintf sends formatted output to a string. In fact, it does the following:
- accepts a series of arguments;
- applies to each a format specifier contained in the format string pointed to by format;
- outputs the formatted data (up to maxlen characters, including the terminating null byte) to the string pointed to by buffer;
snprintf applies the first format specifier to the first argument, the second
to the second, and so on. The format string, controls how snprintf will convert
and format its arguments. See printf for more info about
format specifiers.
snprintf returns the number of bytes output, not including the terminating null
byte in the count.
Uses: vsnprintf
See also: sprintf, vsnprintf