std::wprintf,std::fwprintf,std::swprintf (3) - Linux Man Pages
std::wprintf,std::fwprintf,std::swprintf - std::wprintf,std::fwprintf,std::swprintf
Defined in header <cwchar>
int wprintf( const wchar_t* format, ... ); (1)
int fwprintf( std::FILE* stream, const wchar_t* format, ... ); (2)
int swprintf( wchar_t* buffer, std::size_t size, const wchar_t* format, ... ); (3)
Loads the data from the given locations, converts them to wide string equivalents and writes the results to a variety of sinks.
1) Writes the results to stdout.
2) Writes the results to a file stream stream.
3) Writes the results to a wide string buffer. At most size-1 wide characters are written followed by null wide character.
stream - output file stream to write to
buffer - pointer to a wide character string to write to
size - up to size - 1 characters may be written, plus the null terminator
pointer to a null-terminated wide string specifying how to interpret the data.
The format string consists of ordinary wide characters (except %), which are copied unchanged into the output stream, and conversion specifications. Each conversion specification has the following format:
* introductory % character
* (optional) one or more flags that modify the behavior of the conversion:
* -: the result of the conversion is left-justified within the field (by default it is right-justified)
* +: the sign of signed conversions is always prepended to the result of the conversion (by default the result is preceded by minus only when it is negative)
* space: if the result of a signed conversion does not start with a sign character, or is empty, space is prepended to the result. It is ignored if + flag is present.
* # : alternative form of the conversion is performed. See the table below for exact effects otherwise the behavior is undefined.
* 0 : for integer and floating point number conversions, leading zeros are used to pad the field instead of space characters. For integer numbers it is ignored if the precision is explicitly specified. For other conversions using this flag results in undefined behavior. It is ignored if - flag is present.
* (optional) integer value or * that specifies minimum field width. The result is padded with space characters (by default), if required, on the left when right-justified, or on the right if left-justified. In the case when * is used, the width is specified by an additional argument of type int. If the value of the argument is negative, it results with the - flag specified and positive field width. (Note: This is the minimum width: The value is never truncated.)
* (optional) . followed by integer number or *, or neither that specifies precision of the conversion. In the case when * is used, the precision is specified by an additional argument of type int. If the value of this argument is negative, it is ignored. If neither a number nor * is used, the precision is taken as zero. See the table below for exact effects of precision.
* (optional) length modifier that specifies the size of the argument
* conversion format specifier
The following format specifiers are available:
Conversion Explanation Argument type
length modifier hh h (none) l ll j z t L