diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-02 14:30:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-02 14:30:30 (GMT) |
commit | 8214e44b57a7ed7914a9d3eb4de78d298402edf0 (patch) | |
tree | 51f4f029ebd5893bc62dcc7b5f35078b6b9bf25c /doc/string.n | |
parent | d967827b739973e53a0ca4e78ad873ee45949160 (diff) | |
parent | 3f4534b92ba967574dc4106bc346ccbbfed9d638 (diff) | |
download | tcl-8214e44b57a7ed7914a9d3eb4de78d298402edf0.zip tcl-8214e44b57a7ed7914a9d3eb4de78d298402edf0.tar.gz tcl-8214e44b57a7ed7914a9d3eb4de78d298402edf0.tar.bz2 |
test Tcl_GetErrorLine() forwards/backwards compatibility in pkgb.so as well.
Marked some string subcommands as obsolete, following discussion on tcl-core.
Don't free ctrl.script if thread creation fails: it is a constant string "testthread wait" normally.
Diffstat (limited to 'doc/string.n')
-rw-r--r-- | doc/string.n | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/doc/string.n b/doc/string.n index dfb5a90..e74b8a2 100644 --- a/doc/string.n +++ b/doc/string.n @@ -20,16 +20,6 @@ string \- Manipulate strings Performs one of several string operations, depending on \fIoption\fR. The legal \fIoption\fRs (which may be abbreviated) are: .TP -\fBstring bytelength \fIstring\fR -Returns a decimal string giving the number of bytes used to represent -\fIstring\fR in memory. Because UTF\-8 uses one to three bytes to -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 (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 Perform a character-by-character comparison of strings \fIstring1\fR and \fIstring2\fR. Returns \-1, 0, or 1, depending on whether @@ -128,7 +118,7 @@ empty string returns 0, otherwise an empty string will return 1 on any class. If \fB\-failindex\fR is specified, then if the function returns 0, the index in the string where the class was no longer valid will be stored in the variable named \fIvarname\fR. The \fIvarname\fR -will not be set if the function returns 1. The following character +will not be set if \fBstring is\fR returns 1. The following character classes are recognized (the class name can be abbreviated): .RS .IP \fBalnum\fR 12 @@ -355,6 +345,21 @@ Returns a value equal to \fIstring\fR except that any trailing characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). +.SH "OBSOLETE SUBCOMMANDS" +.PP +These subcommands are currently supported, but are likely to go away in a +future release as their functionality is either virtually never used or highly +misleading. +.TP +\fBstring bytelength \fIstring\fR +Returns a decimal string giving the number of bytes used to represent +\fIstring\fR in memory. Because UTF\-8 uses one to three bytes to +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 (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 wordend \fIstring charIndex\fR Returns the index of the character just after the last one in the word @@ -377,9 +382,9 @@ prefix of the string \fBfoobar\fR. .CS set length [\fBstring length\fR $string] if {$length == 0} { - set isPrefix 0 + set isPrefix 0 } else { - set isPrefix [\fBstring equal\fR -length $length $string "foobar"] + set isPrefix [\fBstring equal\fR -length $length $string "foobar"] } .CE |