man pages section 3: Basic Library Functions

Exit Print View

Updated: July 2014
 
 

wcwidth(3C)

Name

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

Synopsis

#include <wchar.h>

int wcwidth(wchar_t wc);

Description

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.

Return Values

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).

Errors

No errors are defined.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
CSI
Enabled
Interface Stability
Committed
MT-Level
MT-Safe with exceptions
Standard

See also

setlocale(3C), wcswidth(3C), attributes(5), standards(5)