Everything

sscanf


Inputs data from the specified storage area and converts it according to a format.

[Format]

#include <stdio.h>

long sscanf (const char *s, const char *control[, ptr...]);

[Parameters]

s Storage area containing data to be input

control Pointer to string indicating format

ptr,... Pointer to storage area that stores input and converted data

[Return values]

Normal: Number of data items successfully input and converted

Abnormal: EOF

[Remarks]

The sscanf function inputs data from the storage area pointed to by s, converts and edits it according to the string that represents the format pointed to by control, and stores the result in the storage area pointed to by ptr.

The sscanf function returns the number of data items successfully input and converted. EOF is returned when the input data ends before the first conversion.

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