Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/ToUpper.3 @ 25

Last change on this file since 25 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 3.0 KB
Line 
1'\"
2'\" Copyright (c) 1997 by Sun Microsystems, Inc.
3'\"
4'\" See the file "license.terms" for information on usage and redistribution
5'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6'\"
7'\" RCS: @(#) $Id: ToUpper.3,v 1.3 2004/09/06 09:44:57 dkf Exp $
8'\"
9.so man.macros
10.TH Tcl_UtfToUpper 3 "8.1" Tcl "Tcl Library Procedures"
11.BS
12.SH NAME
13Tcl_UniCharToUpper, Tcl_UniCharToLower, Tcl_UniCharToTitle, Tcl_UtfToUpper, Tcl_UtfToLower, Tcl_UtfToTitle \- routines for manipulating the case of Unicode characters and UTF-8 strings
14.SH SYNOPSIS
15.nf
16\fB#include <tcl.h>\fR
17.sp
18Tcl_UniChar
19\fBTcl_UniCharToUpper\fR(\fIch\fR)
20.sp
21Tcl_UniChar
22\fBTcl_UniCharToLower\fR(\fIch\fR)
23.sp
24Tcl_UniChar
25\fBTcl_UniCharToTitle\fR(\fIch\fR)
26.sp
27int
28\fBTcl_UtfToUpper\fR(\fIstr\fR)
29.sp
30int
31\fBTcl_UtfToLower\fR(\fIstr\fR)
32.sp
33int
34\fBTcl_UtfToTitle\fR(\fIstr\fR)
35.SH ARGUMENTS
36.AS char *str in/out
37.AP int ch in
38The Tcl_UniChar to be converted.
39.AP char *str in/out
40Pointer to UTF-8 string to be converted in place.
41.BE
42
43.SH DESCRIPTION
44.PP
45The first three routines convert the case of individual Unicode characters:
46.PP
47If \fIch\fR represents a lower-case character,
48\fBTcl_UniCharToUpper\fR returns the corresponding upper-case
49character.  If no upper-case character is defined, it returns the
50character unchanged.
51.PP
52If \fIch\fR represents an upper-case character,
53\fBTcl_UniCharToLower\fR returns the corresponding lower-case
54character.  If no lower-case character is defined, it returns the
55character unchanged.
56.PP
57If \fIch\fR represents a lower-case character,
58\fBTcl_UniCharToTitle\fR returns the corresponding title-case
59character.  If no title-case character is defined, it returns the
60corresponding upper-case character.  If no upper-case character is
61defined, it returns the character unchanged.  Title-case is defined
62for a small number of characters that have a different appearance when
63they are at the beginning of a capitalized word.
64.PP
65The next three routines convert the case of UTF-8 strings in place in
66memory:
67.PP
68\fBTcl_UtfToUpper\fR changes every UTF-8 character in \fIstr\fR to
69upper-case.  Because changing the case of a character may change its
70size, the byte offset of each character in the resulting string may
71differ from its original location.  \fBTcl_UtfToUpper\fR writes a null
72byte at the end of the converted string.  \fBTcl_UtfToUpper\fR returns
73the new length of the string in bytes.  This new length is guaranteed
74to be no longer than the original string length.
75.PP
76\fBTcl_UtfToLower\fR is the same as \fBTcl_UtfToUpper\fR except it
77turns each character in the string into its lower-case equivalent.
78.PP
79\fBTcl_UtfToTitle\fR is the same as \fBTcl_UtfToUpper\fR except it
80turns the first character in the string into its title-case equivalent
81and all following characters into their lower-case equivalents.
82
83.SH BUGS
84.PP
85At this time, the case conversions are only defined for the ISO8859-1
86characters.  Unicode characters above 0x00ff are not modified by these
87routines.
88
89.SH KEYWORDS
90utf, unicode, toupper, tolower, totitle, case
Note: See TracBrowser for help on using the repository browser.