Writes output to an array of wide characters under control of the wide-character format string.
#include <wchar.h> int swprintf (wchar_t *s, size_t n, const wchar_t *format, . . . );
If no conversion specifications are given, the output sources can be omitted. Otherwise, the function calls must have exactly as many output sources as there are conversion specifications, and the conversion specifications must match the types of the output sources.
Conversion specifications are matched to output sources in left-to- right order. Excess output pointers, if any, are ignored.
No more than n wide characters are written, including a terminating null wide character, which is always added (unless n is 0).
See also fwprintf in this section.
x | The number of wide characters written, not counting the terminating null wide character. |
Negative value | Indicates an error. Either n or more wide characters were requested to be written, or a conversion error occurred, in which case errno is set to EILSEQ. |