Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

wcswidth - get number of column positions of wide character string

&pagelevel(4)&pagelevel

Syntax

#include <wchar.h>

int wcswidth(const wchar_t *pwcs, size_t n);

Description

wcswidth() determines the number of column positions required for n characters in the
string pointed to by pwcs. If a null wide character code is encountered before n characters
are exhausted, fewer than n characters are processed.

Return val.

Number of column positions for the wide character string pwcs.


0

if pwcs points to a null wide character code.


-1

if pwcs contains a non-printing wide character code.

Notes

Restriction
This version of the C runtime system only supports 1-byte characters as wide character
codes. They are of type wchar_t (see stddef.h). (End)

See also

wchar.h.