The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group


wcwidth - number of column positions of a wide-character code


#include <wchar.h>

int wcwidth(wchar_t wc);


The wcwidth() function determines the number of column positions required for the wide character wc. The value of wc must be a character representable as a wchar_t, and must be a wide-character code corresponding to a valid character in the current locale.


The wcwidth() function either returns 0 (if wc is a null wide-character code), or returns the number of column positions to be occupied by the wide-character code wc, or returns -1 (if wc does not correspond to a printing wide-character code).


No errors are defined.




This function was removed from the final ISO C Amendment 1, and the return value for a non-printable wide character is not specified.




wcswidth(), <wchar.h>.


Derived from MSE working draft.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]