Syntax
fields(string)
Description
The fields() function splits the string around each instance of one or more consecutive white space characters, returning an array of substrings of the string or an empty array if the string contains only white space.
Example
line="This is a line with some words in it" split_line=fields(line) println("The line is: ", line) println("The first word is: ", split_line[0]) println("The third word is: ", split_line[2]) The line is: This is a line with some words in it The first word is: This The third word is: a