summaryrefslogtreecommitdiffstats
path: root/doc/string.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/string.n')
-rw-r--r--doc/string.n52
1 files changed, 38 insertions, 14 deletions
diff --git a/doc/string.n b/doc/string.n
index 6c6761a..e9f8e2c 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.39 2007/10/28 14:17:40 dkf Exp $
+.\" RCS: @(#) $Id: string.n,v 1.40 2007/10/29 01:42:19 dkf Exp $
.\"
.so man.macros
.TH string n 8.1 Tcl "Tcl Built-In Commands"
@@ -77,24 +77,42 @@ string. \fIcharIndex\fR may be specified as follows:
.IP \fIinteger\fR 10
For any index value that passes \fBstring is integer -strict\fR,
the char specified at this integral index
-(e.g. \fB2\fR would refer to the "c" in "abcd").
+(e.g. \fB2\fR would refer to the
+.QW c
+in
+.QW abcd ).
.IP \fBend\fR 10
The last char of the string
-(e.g. \fBend\fR would refer to the "d" in "abcd").
+(e.g. \fBend\fR would refer to the
+.QW d
+in
+.QW abcd ).
.IP \fBend\fR\-\fIN\fR 10
The last char of the string minus the specified integer offset \fIN\fR
-(e.g. \fBend\fR\-1 would refer to the "c" in "abcd").
+(e.g. \fBend\fR\-1 would refer to the
+.QW c
+in
+.QW abcd ).
.IP \fBend\fR+\fIN\fR 10
The last char of the string plus the specified integer offset \fIN\fR
-(e.g. \fBend\fR+\-1 would refer to the "c" in "abcd").
+(e.g. \fBend\fR+\-1 would refer to the
+.QW c
+in
+.QW abcd ).
.IP \fIM\fR+\fIN\fR 10
The char specified at the integral index that is the sum of
integer values \fIM\fR and \fIN\fR
-(e.g. \fB1+1\fR would refer to the "c" in "abcd").
+(e.g. \fB1+1\fR would refer to the
+.QW c
+in
+.QW abcd ).
.IP \fIM\fR\-\fIN\fR 10
The char specified at the integral index that is the difference of
integer values \fIM\fR and \fIN\fR
-(e.g. \fB2\-1\fR would refer to the "b" in "abcd").
+(e.g. \fB2\-1\fR would refer to the
+.QW b
+in
+.QW abcd ).
.PP
In the specifications above, the integer value \fIM\fR contains no
trailing whitespace and the integer value \fIN\fR contains no
@@ -145,8 +163,9 @@ the value, 0 is returned and the \fIvarname\fR will contain \-1.
.IP \fBlist\fR 12
Any proper list structure, with optional surrounding whitespace. In
case of improper list structure, 0 is returned and the \fIvarname\fR
-will contain the index of the "element" where the list parsing fails,
-or \-1 if this cannot be determined.
+will contain the index of the
+.QW element
+where the list parsing fails, or \-1 if this cannot be determined.
.IP \fBlower\fR 12
Any Unicode lower case alphabet character.
.IP \fBprint\fR 12
@@ -231,7 +250,7 @@ it will return the string \fB02c322c222c\fR.
.TP
\fBstring match\fR ?\fB\-nocase\fR? \fIpattern\fR \fIstring\fR
See if \fIpattern\fR matches \fIstring\fR; return 1 if it does, 0 if
-it doesn't. If \fB\-nocase\fR is specified, then the pattern attempts
+it does not. If \fB\-nocase\fR is specified, then the pattern attempts
to match against the string in a case insensitive manner. For the two
strings to match, their contents must be identical except that the
following special sequences may appear in \fIpattern\fR:
@@ -246,10 +265,15 @@ Matches any character in the set given by \fIchars\fR. If a sequence
of the form \fIx\fB\-\fIy\fR appears in \fIchars\fR, then any
character between \fIx\fR and \fIy\fR, inclusive, will match. When
used with \fB\-nocase\fR, the end points of the range are converted to
-lower case first. Whereas {[A\-z]} matches '_' when matching
-case-sensitively ('_' falls between the 'Z' and 'a'), with
-\fB\-nocase\fR this is considered like {[A\-Za\-z]} (and probably what
-was meant in the first place).
+lower case first. Whereas {[A\-z]} matches
+.QW _
+when matching case-sensitively (since
+.QW _
+falls between the
+.QW Z
+and
+.QW a ), with \fB\-nocase\fR this is considered like {[A\-Za\-z]} (and
+probably what was meant in the first place).
.IP \fB\e\fIx\fR 10
Matches the single character \fIx\fR. This provides a way of avoiding
the special interpretation of the characters \fB*?[]\e\fR in