StringLib.getTokenCount function

StringLib.getTokenCount returns the number of tokens in a source string.

Package

eglx.lang

Syntax
static function getTokenCount (source string in, 
                               delimiters string in) 
       returns (int);
source
Takes a source string.
delimiters
Takes a string that contains one or more delimiter characters, with no characters separating one from the next.
Example use

After the following code runs, the value of result is 5 because the tokens are "CALL", "PROGRAM", "ARG1", "ARG2", and "ARG3":

source STRING = "CALL PROGRAM ARG1,ARG2,ARG3";
delimiters STRING = ", ";
result INT;

result = StringLib.getTokenCount(source, delimiters);
Comments
Compatibility

Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.