*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> wcwidth (3)              
Title
Content
Arch
Section
 

wcwidth(3)

Contents


NAME    [Toc]    [Back]

       wcwidth - Determine the display width of wide characters

SYNOPSIS    [Toc]    [Back]

       #include <wchar.h>

       int wcwidth(
               wchar_t wc );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       wcwidth(): XSH5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies a wide character.

DESCRIPTION    [Toc]    [Back]

       The  wcwidth()  function  determines the number of display
       columns to be occupied by the wide character specified  by
       the  wc  parameter. The behavior of the wcwidth() function
       is determined by the LC_CTYPE category.

RETURN VALUES    [Toc]    [Back]

       The wcwidth()  function  returns  the  number  of  display
       columns  to  be  occupied  by  the wc parameter. If the wc
       parameter is a null wide character, a value of 0 (zero) is
       returned.  If  the  wc  parameter contains an invalid wide
       character code, a value of -1 is returned.

EXAMPLES    [Toc]    [Back]

       The following example finds the display width  of  a  wide
       character:

       #include <string.h> #include <locale.h>


       main() {

            wchar_t   wc;        int   retval;       (void)setlocale(LC_ALL,
 " ");      /* Let wc be  the  wide  character
       whose       **  display  width  is  to  be found.       */
            retval=  wcwidth(  wc  );       if(retval   ==   -1){
                 /*            **  Error  handling.  Invalid wide
       character in wc.            */
         } }









SEE ALSO    [Toc]    [Back]

      
      
       Functions: mblen(3), wcslen(3), wcswidth(3)

       Standards: standards(5)



                                                       wcwidth(3)
[ Back ]
 Similar pages
Name OS Title
wcswidth Tru64 Determine the display width of wide-character strings
wcsspn Linux advance in a wide-character string, skipping any of a set of wide characters
wmemset Linux fill an array of wide-characters with a constant wide character
wcscspn Linux search a wide-character string for any of a set of wide characters
wcspbrk Linux search a wide-character string for any of a set of wide characters
iswctype Tru64 Determine the properties of a wide character
wcslen Linux determine the length of a wide-character string
wcwidth Linux determine columns needed for a wide character
glislist IRIX determine if a name corresponds to a display-list
wcsnlen Linux determine the length of a fixed-size wide-character string
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service