summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-12-31 12:32:13 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-12-31 12:32:13 (GMT)
commit1c7c1c74c471463c45093f14f25a4f69af26211f (patch)
treef411373ac516af294863944aa40740375399a35f
parent65dc2244087c3473d889b21b73fa53fb552da528 (diff)
downloadtcl-1c7c1c74c471463c45093f14f25a4f69af26211f.zip
tcl-1c7c1c74c471463c45093f14f25a4f69af26211f.tar.gz
tcl-1c7c1c74c471463c45093f14f25a4f69af26211f.tar.bz2
Marked some string subcommands as obsolete, following discussion on tcl-core.
-rw-r--r--ChangeLog6
-rw-r--r--doc/string.n45
2 files changed, 31 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 43b6dfa..d814777 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-31 Donal K. Fellows <dkf@users.sf.net>
+
+ * doc/string.n: Noted the obsolescence of the 'bytelength',
+ 'wordstart' and 'wordend' subcommands, and moved them to later in the
+ file.
+
2012-12-27 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclListObj.c: [Bug 3598580]: Tcl_ListObjReplace may release
diff --git a/doc/string.n b/doc/string.n
index 6b3cc59..f5eae39 100644
--- a/doc/string.n
+++ b/doc/string.n
@@ -19,26 +19,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.
-.RS
-.PP
-In almost all cases, you should use the
-\fBstring length\fR operation (including determining the length of a
-Tcl byte array value). Refer to the \fBTcl_NumUtfChars\fR manual
-entry for more details on the UTF\-8 representation.
-.PP
-\fICompatibility note:\fR it is likely that this subcommand will be
-withdrawn in a future version of Tcl. It is better to use the
-\fBencoding convertto\fR command to convert a string to a known
-encoding and then apply \fBstring length\fR to that.
-.RE
-.TP
\fBstring compare\fR ?\fB\-nocase\fR? ?\fB\-length int\fR? \fIstring1 string2\fR
.
Perform a character-by-character comparison of strings \fIstring1\fR
@@ -354,6 +334,31 @@ 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 (any character
for which \fBstring is space\fR returns 1, and "\0").
+.SS "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.
+.RS
+.PP
+In almost all cases, you should use the
+\fBstring length\fR operation (including determining the length of a
+Tcl byte array value). Refer to the \fBTcl_NumUtfChars\fR manual
+entry for more details on the UTF\-8 representation.
+.PP
+\fICompatibility note:\fR it is likely that this subcommand will be
+withdrawn in a future version of Tcl. It is better to use the
+\fBencoding convertto\fR command to convert a string to a known
+encoding and then apply \fBstring length\fR to that.
+.RE
.TP
\fBstring wordend \fIstring charIndex\fR
.