StringLib.getTokenCount returns the number of tokens in a source string.
eglx.lang
static function getTokenCount (source string in, delimiters string in) returns (int);
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);
Target | Issue |
---|---|
Java | No issues. |
JavaScript | No issues. |