summaryrefslogtreecommitdiffstats
path: root/doc/StringObj.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/StringObj.3')
-rw-r--r--doc/StringObj.340
1 files changed, 20 insertions, 20 deletions
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index 2d41018..b995171 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -40,7 +40,7 @@ Tcl_UniChar *
int
\fBTcl_GetUniChar\fR(\fIobjPtr, index\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_GetCharLength\fR(\fIobjPtr\fR)
.sp
Tcl_Obj *
@@ -87,38 +87,38 @@ Tcl_Obj *
Points to the first byte of an array of UTF-8-encoded bytes
used to set or append to a string value.
This byte array may contain embedded null characters
-unless \fInumChars\fR is \fBTCL_INDEX_NONE\fR. (Applications needing null bytes
+unless \fInumChars\fR is negative. (Applications needing null bytes
should represent them as the two-byte sequence \fI\e300\e200\fR, use
\fBTcl_ExternalToUtf\fR to convert, or \fBTcl_NewByteArrayObj\fR if
the string is a collection of uninterpreted bytes.)
-.AP size_t length in
+.AP Tcl_Size length in
The number of bytes to copy from \fIbytes\fR when
initializing, setting, or appending to a string value.
-If \fBTCL_INDEX_NONE\fR, all bytes up to the first null are used.
+If negative, all bytes up to the first null are used.
.AP "const Tcl_UniChar" *unicode in
Points to the first byte of an array of Unicode characters
used to set or append to a string value.
This byte array may contain embedded null characters
-unless \fInumChars\fR is \fBTCL_INDEX_NONE\fR.
-.AP size_t numChars in
+unless \fInumChars\fR is negative.
+.AP Tcl_Size numChars in
The number of Unicode characters to copy from \fIunicode\fR when
initializing, setting, or appending to a string value.
-If \fBTCL_INDEX_NONE\fR, all characters up to the first null character are used.
-.AP size_t index in
+If negative, all characters up to the first null character are used.
+.AP Tcl_Size index in
The index of the Unicode character to return.
-.AP size_t first in
+.AP Tcl_Size first in
The index of the first Unicode character in the Unicode range to be
-returned as a new value. If \fBTCL_INDEX_NONE\fR, behave the same as if the
+returned as a new value. If negative, behave the same as if the
value was 0.
-.AP size_t last in
+.AP Tcl_Size last in
The index of the last Unicode character in the Unicode range to be
-returned as a new value. If \fBTCL_INDEX_NONE\fR, take all characters up to
+returned as a new value. If negative, take all characters up to
the last one available.
.AP Tcl_Obj *objPtr in/out
Points to a value to manipulate.
.AP Tcl_Obj *appendObjPtr in
The value to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
-.AP "size_t \&| int" *lengthPtr out
+.AP "ptrdiff_t \&| int" *lengthPtr out
The location where \fBTcl_GetStringFromObj\fR will store the length
of a value's string representation. May be (int *)NULL when not used.
.AP "const char" *string in
@@ -126,7 +126,7 @@ Null-terminated string value to append to \fIobjPtr\fR.
.AP va_list argList in
An argument list which must have been initialized using
\fBva_start\fR, and cleared using \fBva_end\fR.
-.AP size_t limit in
+.AP Tcl_Size limit in
Maximum number of bytes to be appended.
.AP "const char" *ellipsis in
Suffix to append when the limit leads to string truncation.
@@ -135,11 +135,11 @@ If NULL is passed then the suffix
is used.
.AP "const char" *format in
Format control string including % conversion specifiers.
-.AP size_t objc in
+.AP Tcl_Size objc in
The number of elements to format or concatenate.
.AP Tcl_Obj *objv[] in
The array of values to format or concatenate.
-.AP size_t newLength in
+.AP Tcl_Size newLength in
New length for the string value of \fIobjPtr\fR, not including the
final null character.
.BE
@@ -213,8 +213,8 @@ it references a low surrogate preceded by a high surrogate, it returns -1;
characters between \fIfirst\fR and \fIlast\fR (inclusive) in the value's
Unicode representation. If the value's Unicode representation
is invalid, the Unicode representation is regenerated from the value's
-string representation. If \fIfirst\fR == TCL_INDEX_NONE, then the returned
-string starts at the beginning of the value. If \fIlast\fR == TCL_INDEX_NONE,
+string representation. If \fIfirst\fR is negative, then the returned
+string starts at the beginning of the value. If \fIlast\fR negative,
then the returned string ends at the end of the value.
.PP
\fBTcl_GetCharLength\fR returns the number of characters (as opposed
@@ -263,7 +263,7 @@ all \fIlength\fR bytes that are available from being appended, then the
appending is done so that the last bytes appended are from the
string \fIellipsis\fR. This allows for an indication of the truncation
to be left in the string.
-When \fIlength\fR is \fBTCL_INDEX_NONE\fR, all bytes up to the first zero byte are appended,
+When \fIlength\fR is negative, all bytes up to the first zero byte are appended,
subject to the limit. When \fIellipsis\fR is NULL, the default
string \fB...\fR is used. When \fIellipsis\fR is non-NULL, it must point
to a zero-byte-terminated string in Tcl's internal UTF encoding.
@@ -306,7 +306,7 @@ functionality is needed.
.CS
char buf[SOME_SUITABLE_LENGTH];
sprintf(buf, format, ...);
-\fBTcl_NewStringObj\fR(buf, \fBTCL_INDEX_NONE\fR);
+\fBTcl_NewStringObj\fR(buf, -1);
.CE
.PP
but with greater convenience and no need to