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

NAME

6       wcswidth - number of column positions of a wide-character string
7

SYNOPSIS

9       #include <wchar.h>
10
11       int wcswidth(const wchar_t *pwcs, size_t n);
12
13

DESCRIPTION

15       The  wcswidth()  function  determines  the  number  of column positions
16       required for n wide-character codes (or  fewer  than  n  wide-character
17       codes  if a null wide-character code is encountered before n wide-char‐
18       acter codes are exhausted) in the string pointed to by pwcs.
19

RETURN VALUES

21       The wcswidth() function either returns 0 (if  pwcs  points  to  a  null
22       wide-character  code),  or returns the number of column positions to be
23       occupied by the wide-character string pointed to by pwcs, or returns −1
24       (if  any  of  the  first  n  wide-character codes in the wide-character
25       string pointed to by pwcs is not a printing wide-character code).
26

ERRORS

28       No errors are defined.
29

ATTRIBUTES

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

SEE ALSO

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