sscanf
Parses entered characters according to the specified format
sscanf()
function parses input from the string based on the specified format. sscanf()
function parses strings into variables based on format strings.
If only two parameters are passed to the function, the data will be returned as an array. Otherwise, if additional parameters are passed, the parsed data will be stored in these parameters. An error occurs if the number of differentiators is greater than the number of variables containing them. However, if the number of differentiators is less than the number of variables containing them, the additional variables contain NULL.
Related functions:
printf()
- output formatted stringsprintf()
- Write a formatted string into a variable