wcwidth, wcswidth --
determine number of column positions of a wide-character code or string
cc . . . -lc
int wcwidth(wint_t wc);
int wcswidth(const wchar_t *pwcs, size_t n);
determines the number of column positions that the
wc occupies, and returns the number.
Its argument, wc, must have a value that may
be represented as a wchar_t, and corresponds
to a valid character in the current locale.
determines the number of column positions that
the first n wide-character codes
in the array pwcs will occupy.
If pwcs points to a string of less than n wide characters,
the number of column positions that the string
will occupy is determined instead.
These routines return the number of column positions to be occupied.
If wc is a null wide-character code or pwcs
points to a null string, zero is returned.
may also return -1 in two situations:
when any of the first n wide-character codes in the array
pwcs is not a printing wide-character code,
or, if pwcs points to a string of length n or less,
when any of the wide-character codes in this string
is not a printing wide-character code.
The value of errno is undefined.
The definition of ``Column Position'' in
X/Open CAE Specification, System Interface Definitions,
Issue 4, 1992,
Chapter 2, Glossary
are conformant with:
X/Open CAE Specification, System Interfaces and Headers,
Issue 4, 1992.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003