Print formatted wide-character output into a string
#include <wchar.h> int swprintf( wchar_t * ws, size_t n, const wchar_t * format, ... );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The swprintf() function is similar to fwprintf() except that swprintf() places the generated output into the wide-character array pointed to by buf, instead of writing it to a file. A null character is placed at the end of the generated character string.
The swprintf() function is the wide-character version of sprintf().
The number of wide characters written, excluding the terminating NUL, or a negative number if an error occurred (errno is set).
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Read the Caveats |
Thread | Yes |
It's safe to call this function in a signal handler if the data isn't floating point.
errno, fprintf(), fwprintf(), printf(), snprintf(), sprintf(), vfprintf(), vfwprintf(), vprintf(), vsnprintf(), vsprintf(), vswprintf(), vwprintf(), wprintf()