1wcwidth(3C)              Standard C Library Functions              wcwidth(3C)
2
3
4

NAME

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

SYNOPSIS

9       #include <wchar.h>
10
11       int wcwidth(wchar_t wc);
12
13

DESCRIPTION

15       The  wcwidth()  function  determines  the  number  of  column positions
16       required for the wide character wc. The value of wc must be a character
17       representable  as  a  wchar_t, and must be a wide-character code corre‐
18       sponding to a valid character in the current locale.
19

RETURN VALUES

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

ERRORS

27       No errors are defined.
28

ATTRIBUTES

30       See attributes(5) for descriptions of the following attributes:
31
32
33
34
35       ┌─────────────────────────────┬─────────────────────────────┐
36       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
37       ├─────────────────────────────┼─────────────────────────────┤
38       │CSI                          │Enabled                      │
39       ├─────────────────────────────┼─────────────────────────────┤
40       │Interface Stability          │Standard                     │
41       ├─────────────────────────────┼─────────────────────────────┤
42       │MT-Level                     │MT-Safe with exceptions      │
43       └─────────────────────────────┴─────────────────────────────┘
44

SEE ALSO

46       setlocale(3C), wcswidth(3C), attributes(5), standards(5)
47
48
49
50SunOS 5.11                        14 Aug 2002                      wcwidth(3C)
Impressum