GetNthWord

STD.Str.GetNthWord( source, instance )

STD.Uni.GetNthWord ( source, instance [ , locale ] )

sourceA string containing the space-delimited words.
instanceAn integer specifying the word to return.
localeA null-terminated string containing the language and country code to use to determine correct sort order and other operations.
Return:GetNthWord returns a string value.

The GetNthWord function returns the word in the instance position in the sourcestring.

Example:

IMPORT Std;

str1 := 'a word a day keeps the doctor away';

STD.STr.GetNthWord(str1,2);    //returns "word"