Everything

snprintf


Converts data according to a format and outputs it to the specified area.

[Format]

#include <stdio.h>

long snprintf(char *restrict s, size_t n, const char *restrict control [, arg]...);

[Parameters]

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

n Number of characters to be output

control Pointer to string indicating format

arg,... Data to be output according to format

[Return values]

Number of characters converted

[Remarks]

The snprintf function converts and edits parameter arg according to the format-representing string 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.