summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorstanton <stanton>1999-05-06 18:46:23 (GMT)
committerstanton <stanton>1999-05-06 18:46:23 (GMT)
commita23a8f73b3f2aba2722a1363e2d822018fbf504c (patch)
tree83931fceb76a5ac3644164e10b423d8a14719ee9 /doc
parent790b81e6f748b60c1d89b7741a5ce2888d1ecc0b (diff)
downloadtcl-a23a8f73b3f2aba2722a1363e2d822018fbf504c.zip
tcl-a23a8f73b3f2aba2722a1363e2d822018fbf504c.tar.gz
tcl-a23a8f73b3f2aba2722a1363e2d822018fbf504c.tar.bz2
* doc/Utf.3:
* generic/tclStubInit.c: * generic/tclDecls.h: * generic/tclUtf.c: * generic/tcl.decls: Added Tcl_UtfNcmp and Tcl_UtfNcasecmp.
Diffstat (limited to 'doc')
-rw-r--r--doc/Utf.324
1 files changed, 22 insertions, 2 deletions
diff --git a/doc/Utf.3 b/doc/Utf.3
index 12756bc..0c331a8 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Utf.3,v 1.3 1999/04/30 22:45:01 stanton Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.4 1999/05/06 18:46:23 stanton Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
@@ -36,6 +36,12 @@ int
\fBTcl_UniCharNcmp\fR(\fIuniStr, uniStr, num\fR)
.sp
int
+\fBTcl_UtfNcmp\fR(\fIsrc, src, num\fR)
+.sp
+int
+\fBTcl_UtfNcasecmp\fR(\fIsrc, src, num\fR)
+.sp
+int
\fBTcl_UtfCharComplete\fR(\fIsrc, len\fR)
.sp
int
@@ -83,7 +89,7 @@ equal to 0.
.AP "Tcl_DString" *dstPtr in/out
A pointer to a previously-initialized \fBTcl_DString\fR.
.AP size_t n in
-The number of Unicode characters to compare in \fBTcl_UniCharNcmp\fR.
+The number of characters to compare.
.AP "CONST char" *start in
Pointer to the beginning of a UTF-8 string.
.AP int index in
@@ -151,6 +157,20 @@ greater than, equal to,
or less than 0 if the first string is greater than, equal to, or
less than the second string respectively.
.PP
+\fBTcl_UtfNcmp\fR corresponds to \fBstrncmp\fR for UTF-8 strings. It
+accepts two NULL-terminated UTF-8 strings and the number of characters
+to compare. (Both strings are assumed to be at least \fIlen\fR
+characters long.) \fBTcl_UtfNcmp\fR compares the two strings
+character-by-character according to the Unicode character ordering.
+It returns an integer greater than, equal to, or less than 0 if the
+first string is greater than, equal to, or less than the second string
+respectively.
+.PP
+\fBTcl_UtfNcasecmp\fR corresponds to \fBstrncasecmp\fR for UTF-8
+strings. It is similar to \fBTcl_UtfNcmp\fR except comparisons ignore
+differences in case when comparing upper, lower or title case
+characters.
+.PP
\fBTcl_UtfCharComplete\fR returns 1 if the source UTF-8 string \fIsrc\fR
of length \fIlen\fR bytes is long enough to be decoded by
\fBTcl_UtfToUniChar\fR, or 0 otherwise. This function does not guarantee