[Previous] [Contents] [Next]

swprintf()

Print formatted output into a string

Synopsis:

#include <wchar.h>

int swprintf( wchar_t * ws, 
              size_t n,
              const wchar_t * format, 
             ... );

Library:

libc

Description:

The swprintf() function is equivalent to the fwprintf() function, except that the argument ws specifies a character array into which the generated output is placed, rather than to a file. A null character is placed at the end of the generated character string.

The format string is the same as the one used by printf(). The swprint() function is the wide-character version of sprintf().

Returns:

<0
Failure; an error occurred and errno is set.
x
Success; the number of characters written, excluding the terminating NUL.

Classification:

ANSI

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

errno, fwprintf(), printf(), vfwprintf(), vwprintf(), vswprintf(), wprintf()


[Previous] [Contents] [Next]