1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
.TH GOLF 2gg $VERSION $DATE Development Tools
.SH NAME
string-length \- (strings)
.SH PURPOSE
Get string length.
.SH SYNTAX
.RS 4
.EX
string-length <string> to <length>
.EE
.RE
.SH DESCRIPTION
string-length will place the number of bytes in <string> into number <length>.
Note that <string> does not need to be null-terminated, meaning it can be a binary or text string. <length> is the number of bytes comprising any such string.
.SH EXAMPLES
Variable "len" will be 6:
.RS 4
.EX
set-string str = "string"
string-length str to len
.EE
.RE
Variable "len2" will be 18 - the string has a null character in the middle of it:
.RS 4
.EX
set-string str2 = "string" "\ex00 after null"
string-length str2 to len2
.EE
.RE
.SH SEE ALSO
Strings
\fBconcatenate-strings\fP
\fBcopy-string\fP
\fBcount-substring\fP
\fBdelete-string\fP
\fBlower-string\fP
\fBnew-string\fP
\fBread-split\fP
\fBreplace-string\fP
\fBset-string\fP
\fBsplit-string\fP
\fBstring-length\fP
\fBtrim-string\fP
\fBupper-string\fP
\fBwrite-string\fP
See all
\fBdocumentation\fP
|