swprintf function — Writes formatted data to a wide string
int swprintf(wchar_t* dst, size_t n, const wchar_t* format, . . . )
The swprintf
function is
similar to sprintf
, except it
stores the formatted output in a wide string, dst
, and the format
is a wide string. Another
difference is that n
is the
maximum number of wide characters (including a terminating null wide
character) that can be written to dst
.
The return value is the number of wide characters actually
stored in dst
(not counting the
terminating null wide character) or a negative value if the
formatted output requires n
or
more characters (not including the terminating null
character).