NairnFEAMPM Icon

Words Command

The Words command divides up a variable by words:

Words "(varName)",(start),(end),(expr),<(split)>

where:

When done, the result will be in the specified variable. If the qouted variable name is "#varName", for example, the extracted words will be in #varName[1], #varName[2], etc., and the total number of words will be stored in #varName[0].

Notes

  1. Splitting at spaces (using (split)=" ") is not the same as omitting (split) to split at white space. The former will count every space as a delimiter and words between adjacent spaces will the zero-length strings. In contrast, splitting at whitespace considers multiple spaces as a single word delimiter.