The vu8sscanf_s function reads a formatted utf-8 string, and writes to a list of arguments.
Like u8sscanf_s(), the c, s, and %[ conversion specifiers here require their Annex K companion rsize_t destination-size argument: it is always consumed and enforced.
- Parameters
-
| [in] | dest | pointer to a NUL-terminated utf-8 string to read from |
| [in] | fmt | format-control string. |
| [out] | ap | arguments to write to; every c, s, and %[ is followed by an rsize_t giving the size of its destination array |
- Precondition
- Neither
dest nor fmt shall be a null pointer.
-
dest shall not contain an illegal or truncated UTF-8 sequence.
-
c, s, and %[ conversion specifiers each expect two arguments (the usual pointer and a value of type rsize_t indicating the size of the receiving array, which may be 1 when reading with a c into a single character).
- Returns
- Number of receiving arguments successfully assigned, or
EOF if read failure occurs before the first receiving argument was assigned or if there is a runtime constraint violation.
- Return values
-
| > | 0 on success, the number of arguments assigned |
| EOF | on error, or when dest contains illegal UTF-8 or a c/s/%[ destination is too small (errno set to EILSEQ resp. ESNOSPC) |
- See also
- u8sscanf_s(), vsscanf_s()