Seth Woolley's Man Viewer

ToUpper(3) - Tcl_UniCharToLower, Tcl_UniCharToTitle, Tcl_UniCharToUpper, Tcl_UtfToLower, Tcl_UtfToTitle, Tcl_UtfToUpper, Tcl_UniCharToLower, Tcl_UniCharToTitle, Tcl_UniCharToUpper, Tcl_UtfToLower, Tcl_UtfToTitle, Tcl_UtfToUpper - routines for manipulating the case of Unicode characters and UTF-8 strings - man 3 ToUpper

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

Tcl_UtfToUpper(3)           Tcl Library Procedures           Tcl_UtfToUpper(3)



NAME
       Tcl_UniCharToUpper,       Tcl_UniCharToLower,       Tcl_UniCharToTitle,
       Tcl_UtfToUpper, Tcl_UtfToLower, Tcl_UtfToTitle - routines  for  manipu-
       lating the case of Unicode characters and UTF-8 strings.

SYNOPSIS
       #include <tcl.h>

       Tcl_UniChar
       Tcl_UniCharToUpper(ch)

       Tcl_UniChar
       Tcl_UniCharToLower(ch)

       Tcl_UniChar
       Tcl_UniCharToTitle(ch)

       int
       Tcl_UtfToUpper(str)

       int
       Tcl_UtfToLower(str)

       int
       Tcl_UtfToTitle(str)

ARGUMENTS
       The  Tcl_UniChar  to  be converted.  Pointer to UTF-8 string(3,n) to be con-
       verted in(1,8) place.


DESCRIPTION
       The first three routines convert the case of individual Unicode charac-
       ters:

       If ch represents a lower-case character, Tcl_UniCharToUpper returns the
       corresponding upper-case character.   If  no  upper-case  character  is
       defined, it returns the character unchanged.

       If  ch  represents  an upper-case character, Tcl_UniCharToLower returns
       the corresponding lower-case character.  If no lower-case character  is
       defined, it returns the character unchanged.

       If ch represents a lower-case character, Tcl_UniCharToTitle returns the
       corresponding title-case character.   If  no  title-case  character  is
       defined,  it  returns  the  corresponding  upper-case character.  If no
       upper-case character is defined, it returns  the  character  unchanged.
       Title-case is defined for a small number of characters that have a dif-
       ferent appearance when they are at the beginning of a capitalized word.

       The  next  three routines convert the case of UTF-8 strings in(1,8) place in(1,8)
       memory:

       Tcl_UtfToUpper changes every UTF-8  character  in(1,8)  str  to  upper-case.
       Because  changing the case of a character may change its size, the byte
       offset of each character in(1,8) the resulting string(3,n) may  differ  from  its
       original location.  Tcl_UtfToUpper writes a null byte at the end of the
       converted string.  Tcl_UtfToUpper returns the new length of the  string(3,n)
       in(1,8) bytes.  This new length is guaranteed to be no longer than the orig-
       inal string(3,n) length.

       Tcl_UtfToLower is the same as Tcl_UtfToUpper except it turns each char-
       acter in(1,8) the string(3,n) into its lower-case equivalent.

       Tcl_UtfToTitle  is the same as Tcl_UtfToUpper except it turns the first
       character in(1,8) the string(3,n) into its title-case equivalent and all  follow-
       ing characters into their lower-case equivalents.


BUGS
       At  this  time(1,2,n), the case conversions are only defined for the ISO8859-1
       characters.  Unicode characters above 0x00ff are not modified by  these
       routines.


KEYWORDS
       utf, unicode, toupper, tolower, totitle, case



Tcl                                   8.1                    Tcl_UtfToUpper(3)

References for this manual (incoming links)