Print formatted data to a string.
int vsprintf (char * string, char * format, va_list arguments);
Required Header |
<stdio.h> |
Return Value
This function returns the number of characters printed to the string. -1 indicates an error.
Parameters
string
A pointer to the string result
format
The format control string
arguments
Optional arguments pointer
Remarks
The vsprintf 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.
See Also fprintf, fread, fscanf, fwrite, printf, _snprintf, sprintf vfprintf, vfscanf, vprintf, _vsnprintf