Print formatted data to a string.
int _snprintf (char * string, size_t max, char * format [, arguments]...);
int snprintf (char * string, size_t max, char * format [, arguments]...);
Required Header |
<stdio.h> |
Return Value
Each of these functions return the number of characters printed to the string.
Parameters
string
A pointer to the string result
max
The maximum number of characters to print
format
The format control string
arguments
Optional arguments
Remarks
The _snprintf function prints formatted data to the string based on the same rules of the printf function, using the optional arguments as specified by the format string. No more then max characters are inserted into the string buffer.
See Also fprintf, printf, sprintf, sscanf, _vsnprintf