summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--doc/string.n10
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 870a399..43a556c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-24 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * doc/string.n: Added clarifying note.
+
2004-08-23 Don Porter <dgp@users.sourceforge.net>
* library/auto.tcl: Updated [tcl_findLibrary] search path
diff --git a/doc/string.n b/doc/string.n
index 26d1b10..ff331b4 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.20 2004/06/30 12:34:35 dkf Exp $
+'\" RCS: @(#) $Id: string.n,v 1.21 2004/08/24 08:59:54 dkf Exp $
'\"
.so man.macros
.TH string n 8.1 Tcl "Tcl Built-In Commands"
@@ -194,6 +194,14 @@ will have no affect for later key matches. For example,
\fBstring map {abc 1 ab 2 a 3 1 0} 1abcaababcabababc\fR
.CE
will return the string \fB01321221\fR.
+.PP
+Note that if an earlier \fIkey\fR is a prefix of a later one, it will
+completely mask the later one. So if the previous example is
+reordered like this,
+.CS
+\fBstring map {1 0 ab 2 a 3 abc 1} 1abcaababcabababc\fR
+.CE
+it will return the string \fB02c322c222c\fR.
.RE
.TP
\fBstring match\fR ?\fB\-nocase\fR? \fIpattern\fR \fIstring\fR