strSplit


strSplit String Array

strSplit (String input, String expr)

Splits input into an array of tokens using the expression in expr as token delimiters.

Parameters:

input

the string to be split

expr

a regular expression to define the token separators

Returns:

An array of strings; each element contains one token.

Related topics

Example:

str = "This is an example string"

tokens = strSplit(str, " ")

// tokens[0] is "This"

// tokens[1] is "is"

// tokens[2] is "an"

// tokens[3] is "example"

// tokens[4] is "string"

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*