swscanf()

Updated: April 19, 2023

Scan input from a wide-character string

Synopsis:

#include <wchar.h>

int swscanf( const wchar_t * ws,
             const wchar_t * format,
             ... );

Arguments:

ws
The wide-character string that you want to read from.
format
A wide-character string that specifies the format of the input. For more information, see scanf(). The formatting string determines what additional arguments you need to provide.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The swscanf() function scans input from the wide-character string ws, under control of the argument format. Following the format string is the list of addresses of items to receive values.

The swscanf() function is the wide-character version of sscanf().

Returns:

The number of input arguments for which values were successfully scanned and stored, or EOF when the scanning is terminated by reaching the end of the input string.

Classification:

ANSI, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes