Everything

vsprintf


Outputs a variable parameter list to the specified storage area according to a format.

[Format]

#include <stdarg.h>

#include <stdio.h>

long vsprintf (char *s, const char *control, va_list arg);

[Parameters]

s Pointer to storage area to which data is to be output

control Pointer to string indicating format

arg Parameter list

[Return values]

Normal: Number of characters converted

Abnormal: Negative value

[Remarks]

The vsprintf function sequentially converts and edits a variable parameter list according to the string that represents the format pointed to by control, and outputs the result to the storage area pointed to by s.

A null character is appended at the end of the converted and output string. This null character is not included in the return value (number of characters output).

For details of the format specifications, see the description of the fprintf function.

Parameter arg, indicating the parameter list, must be initialized beforehand by the va_start macro (and the succeeding va_arg macro).