Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

wchar(5)

wcwidth(3C)                                                     wcwidth(3C)

NAME
     wcwidth, wcswidth - number of column positions of a wide character
     code

SYNOPSIS
     #include <wchar.h>

     int wcwidth(wintt wc);

     int wcswidth(const wchart *pwcs, sizet n);

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

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

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

     The wcswidth() function either returns zero (if pwcs is a null wide
     character code), or returns the number of column positions to be occu-
     pied by the wide character string pwcs, or returns -1 (if any wide
     character code in the wide character string pointed to by pwcs is not
     a printing wide character code).

SEE ALSO
     wchar(5).



















Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026