Writes wide-character output to a specified character array under format control.
#include <wchar.h> int swprintf ( wchar_t *ws, size_t n, const wchar_t *format, ...);
(OUT) Points to the character array into which to place the output. The array always ends in a NULL wide character unless the n parameter is zero.
(IN) Specifies the number of characters to output.
(IN) Points to the format control string. See Section 12.4, Wide-Character Print Format Control Strings.
(IN) Points to an argument for a conversion specifier. The number of arguments is determined by the format string.
If successful, returns the number of characters written. Otherwise, returns a negative value and sets errno to one of the following:
The swprintf function is equivalent to fwprintf, except that the ws parameter specifies a character array into which the generated output is placed, rather than a file. If the n parameter is not zero, a NULL character is placed at the end of the character array.