Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Standard C Library Functionswcswidth(3C)


NAME

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

SYNOPSIS

 
#include <wchar.h>
int wcswidth(const wchar_t *pwcs, size_t n);

DESCRIPTION

 

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-character codes are exhausted) in the string pointed to by pwcs.

RETURN VALUES

 

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

ERRORS

 

No errors are defined.

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe with exceptions
CSIEnabled

SEE ALSO

 

setlocale(3C), wcwidth(3C), attributes(5)


SunOS 5.9Go To TopLast Changed 20 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.