wcwidth man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

wcwidth(3)							    wcwidth(3)

NAME
       wcwidth - Determine the display width of wide characters

SYNOPSIS
       #include <wchar.h>

       int wcwidth(
	       wchar_t wc );

LIBRARY
       Standard C Library (libc)

STANDARDS
       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       wcwidth(): XSH5.0

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

PARAMETERS
       Specifies a wide character.

DESCRIPTION
       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 cate‐
       gory.

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

EXAMPLES
       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
       Functions: mblen(3), wcslen(3), wcswidth(3)

       Standards: standards(5)

								    wcwidth(3)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net