summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2019-04-14 15:14:50 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2019-04-14 15:14:50 (GMT)
commit564d3a1a7b42dcff5a8f6c5a5545e19cf58e3617 (patch)
tree94b250a476017db7839fdec317d2d20dc2f9f6d7
parenta929d96cba7e205831e7cd9daf93fd81326c484a (diff)
downloadtcl-564d3a1a7b42dcff5a8f6c5a5545e19cf58e3617.zip
tcl-564d3a1a7b42dcff5a8f6c5a5545e19cf58e3617.tar.gz
tcl-564d3a1a7b42dcff5a8f6c5a5545e19cf58e3617.tar.bz2
Doc tweak
-rw-r--r--doc/string.n16
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/string.n b/doc/string.n
index 13b5969..72c7913 100644
--- a/doc/string.n
+++ b/doc/string.n
@@ -89,9 +89,9 @@ length of the string then this command returns an empty string.
.RE
.TP
\fBstring insert \fIstring index insertString\fR
-.
+.VS "TIP 504"
Returns a copy of \fIstring\fR with \fIinsertString\fR inserted at the
-\fIindex\fR'th character. \fIindex\fR may be specified as described in the
+\fIindex\fR'th character. The \fIindex\fR may be specified as described in the
\fBSTRING INDICES\fR section.
.RS
.PP
@@ -104,6 +104,7 @@ If \fIindex\fR is at or before the start of \fIstring\fR (e.g., \fIindex\fR is
or after the end of \fIstring\fR (e.g., \fIindex\fR is \fBend\fR),
\fIinsertString\fR is appended to \fIstring\fR.
.RE
+.VE "TIP 504"
.TP
\fBstring is \fIclass\fR ?\fB\-strict\fR? ?\fB\-failindex \fIvarname\fR? \fIstring\fR
.
@@ -291,7 +292,9 @@ the special interpretation of the characters \fB*?[]\e\fR in
.
Returns a range of consecutive characters from \fIstring\fR, starting
with the character whose index is \fIfirst\fR and ending with the
-character whose index is \fIlast\fR. An index of 0 refers to the first
+character whose index is \fIlast\fR (using the forms described in
+\fBSTRING INDICES\fR). An index of \fB0\fR refers to the first
+character of the string; an index of \fBend\fR refers to last
character of the string. \fIfirst\fR and \fIlast\fR may be specified
as for the \fBindex\fR method. If \fIfirst\fR is less than zero then
it is treated as if it were zero, and if \fIlast\fR is greater than or
@@ -301,13 +304,16 @@ string is returned.
.TP
\fBstring repeat \fIstring count\fR
.
-Returns \fIstring\fR repeated \fIcount\fR number of times.
+Returns a string consisting of \fIstring\fR concatenated with itself
+\fIcount\fR times. If \fIcount\fR is 0, the empty string will be
+returned.
.TP
\fBstring replace \fIstring first last\fR ?\fInewstring\fR?
.
Removes a range of consecutive characters from \fIstring\fR, starting
with the character whose index is \fIfirst\fR and ending with the
-character whose index is \fIlast\fR. An index of 0 refers to the
+character whose index is \fIlast\fR (using the forms described in
+\fBSTRING INDICES\fR). An index of 0 refers to the
first character of the string. \fIFirst\fR and \fIlast\fR may be
specified as for the \fBindex\fR method. If \fInewstring\fR is
specified, then it is placed in the removed character range. If