Print formatted data from variable argument list to string.
Composes a string with the same text that would be printed if format was used on printf, but using the elements in the variable argument list identified by arg instead of additional function arguments and storing the resulting content as a C string in the buffer pointed by str.
- Parameters
-
str | Pointer to a buffer where the resulting C-string is stored. The buffer should be large enough to contain the resulting string. |
format | C string that contains the text to be written to the stream.Can contain embedded format specifiers. |
arg | A value identifying a variable arguments list initialized with va_start. |
- Returns
- Total number of characters written to stream.