Unix and Linux Discussions Tagged with case |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
2,411 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
2,761 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,434 |
Shell Programming and Scripting |
|
|
|
6 |
6,619 |
Cybersecurity |
|
|
|
5 |
3,829 |
Shell Programming and Scripting |
|
|
|
3 |
2,628 |
Shell Programming and Scripting |
|
|
|
3 |
1,581 |
Shell Programming and Scripting |
|
|
|
9 |
10,788 |
Shell Programming and Scripting |
|
|
|
4 |
4,662 |
Shell Programming and Scripting |
|
|
|
12 |
2,606 |
Shell Programming and Scripting |
|
|
|
4 |
3,384 |
Shell Programming and Scripting |
|
|
|
3 |
6,378 |
Shell Programming and Scripting |
|
|
|
2 |
2,740 |
Shell Programming and Scripting |
|
|
|
7 |
4,058 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
11,613 |
Shell Programming and Scripting |
|
|
|
1 |
3,299 |
Shell Programming and Scripting |
|
|
|
6 |
15,173 |
Shell Programming and Scripting |
|
|
|
8 |
8,471 |
Shell Programming and Scripting |
|
|
|
2 |
12,560 |
Google Chrome OS |
|
|
|
6 |
9,625 |
UNIX for Dummies Questions & Answers |
|
|
|
7 |
27,523 |
Shell Programming and Scripting |
|
|
|
5 |
4,145 |
Shell Programming and Scripting |
|
|
|
4 |
5,423 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
7,228 |
Shell Programming and Scripting |
|
|
|
2 |
20,205 |
Shell Programming and Scripting |
|
|
|
3 |
5,270 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
1,889 |
Complex Event Processing RSS News |
|
|
|
0 |
1,362 |
Complex Event Processing RSS News |
|
|
|
2 |
33,303 |
Shell Programming and Scripting |
|
|
|
2 |
5,013 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,687 |
Programming |
|
|
|
3 |
5,600 |
Shell Programming and Scripting |
|
|
|
2 |
4,830 |
Shell Programming and Scripting |
|
|
|
2 |
3,220 |
Shell Programming and Scripting |
|
|
|
13 |
5,147 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
6,807 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
1,613 |
Complex Event Processing RSS News |
|
|
|
4 |
9,297 |
Solaris |
|
|
|
0 |
2,380 |
MySQL DevZone RSS |
|
|
|
0 |
1,619 |
Complex Event Processing RSS News |
Tcl_UtfToUpper(3) Tcl Library Procedures Tcl_UtfToUpper(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tcl_UniCharToUpper, Tcl_UniCharToLower, Tcl_UniCharToTitle, Tcl_UtfToUpper, Tcl_UtfToLower, Tcl_UtfToTitle - routines for manipulating 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
int ch (in) The Tcl_UniChar to be converted.
char *str (in/out) Pointer to UTF-8 string to be converted in place.
_________________________________________________________________
DESCRIPTION
The first three routines convert the case of individual Unicode characters:
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 different appearance when they are at the beginning of a capitalized
word.
The next three routines convert the case of UTF-8 strings in place in memory:
Tcl_UtfToUpper changes every UTF-8 character in str to upper-case. Because changing the case of a character may change its size, the byte
offset of each character in the resulting string 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 in bytes. This new length is guaranteed to be no longer than
the original string length.
Tcl_UtfToLower is the same as Tcl_UtfToUpper except it turns each character in the string into its lower-case equivalent.
Tcl_UtfToTitle is the same as Tcl_UtfToUpper except it turns the first character in the string into its title-case equivalent and all fol-
lowing characters into their lower-case equivalents.
BUGS
At this time, 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)