summaryrefslogtreecommitdiffstats
path: root/doc/string.n
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-04-17 23:42:46 (GMT)
committerhobbs <hobbs>2002-04-17 23:42:46 (GMT)
commitf8e3f761fbe684f67eb4bd3e9c2adc2e4af0f6f2 (patch)
treefeab62c44413cdf51d17549c8f3d4593c21900d7 /doc/string.n
parent09d0090da217ada117411536b2d9fd847f71d284 (diff)
downloadtcl-f8e3f761fbe684f67eb4bd3e9c2adc2e4af0f6f2.zip
tcl-f8e3f761fbe684f67eb4bd3e9c2adc2e4af0f6f2.tar.gz
tcl-f8e3f761fbe684f67eb4bd3e9c2adc2e4af0f6f2.tar.bz2
clarified getting length of ByteArray objects to use string length
Diffstat (limited to 'doc/string.n')
-rw-r--r--doc/string.n10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/string.n b/doc/string.n
index 0b4d582..9435274 100644
--- a/doc/string.n
+++ b/doc/string.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: string.n,v 1.14 2000/09/07 14:27:51 poenitz Exp $
+'\" RCS: @(#) $Id: string.n,v 1.15 2002/04/17 23:42:46 hobbs Exp $
'\"
.so man.macros
.TH string n 8.1 Tcl "Tcl Built-In Commands"
@@ -29,7 +29,8 @@ Returns a decimal string giving the number of bytes used to represent
represent Unicode characters, the byte length will not be the same as
the character length in general. The cases where a script cares about
the byte length are rare. In almost all cases, you should use the
-\fBstring length\fR operation. Refer to the \fBTcl_NumUtfChars\fR
+\fBstring length\fR operation (including determining the length of a
+Tcl ByteArray object). Refer to the \fBTcl_NumUtfChars\fR
manual entry for more details on the UTF\-8 representation.
.TP
\fBstring compare\fR ?\fB\-nocase\fR? ?\fB\-length int\fR? \fIstring1 string2\fR
@@ -182,7 +183,10 @@ will return \fB1\fR.
\fBstring length \fIstring\fR
Returns a decimal string giving the number of characters in
\fIstring\fR. Note that this is not necessarily the same as the
-number of bytes used to store the string.
+number of bytes used to store the string. If the object is a
+ByteArray object (such as those returned from reading a binary
+encoded channel), then this will return the actual byte length
+of the object.
.VS 8.1
.TP
\fBstring map\fR ?\fB\-nocase\fR? \fIcharMap string\fR