StringLength (StringTokenizer function)

From m204wiki
Revision as of 19:51, 16 December 2010 by 198.242.244.36 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Length of current tokenizing string

StringLength is a member of the StringTokenizer class.

This method returns the length of the current tokenizing string. This string is the value of the String property.

Syntax

  %num = %tok:StringLength

Syntax terms

%num
A numeric variable to contain the returned length of the tokenizing string.
%tok
A StringTokenizer object variable.

Usage Notes

  • The StartOfString function returns the substring of the tokenizer string that precedes the first character of the current token. The RestOfString function returns the substring of the tokenizer string that follows the current position.

Examples

The following statements return the length of the input string (that is, 24) into %len:

    %toc:string = 'A Stringlength example  '
    %len = %toc:stringlength