NET/MASTER Network Control Language (NCL) Reference Manual

WORDLENGTH
Built-in Functions
106126 Tandem Computers Incorporated 4–107
WORDLENGTH The WORDLENGTH built-in function returns the length of a specified word in a
string.
WORDLENGTH(
string
,
n
)
string
specifies the string to be processed.
n
specifies the word position in
string
of the word whose length you want.
n
must be a positive whole number. If
n
specifies a word position beyond the end of
the string, 0 (zero) is returned.
Consideration
See also WORD and WORDINDEX. The WORD built-in function extracts a word from
a string; the WORDINDEX built-in function returns the position of the first character
of a word in a specified string.
Example
In the following example, the length of the third word in the string “this is a message”
is required. The character length of a is 1, so “1” is returned:
&A = this is a message
&B = 3
&RESULT = WORDLENGTH(&A,&B)