Make your own free website on Tripod.com
3.2.52. SUBWORD(string,start[,length])

Returns the part of string that starts at blank delimited word
start (which must be a positive whole number). If length (which
must be a non-negative whole number) is specified, that number of
words are returned. The default value for length is the rest of
the string.

It is not an error to specify length to refer to more words than
string contains, or for start and length together to specify more
words than string holds. The result string will be stripped of any
leading and trailing blanks, but inter-word blanks will be
preserved as is.

     SUBWORD(‘To be or not  to be’, 4)       –>   ‘not  to be’
     SUBWORD(‘To be or not  to be’, 4, 2)    –>   ‘not  to’
     SUBWORD(‘To be or not  to be’, 4, 5)    –>   ‘not  to be’
     SUBWORD(‘To be or not  to be’, 1, 3)    –>   ‘To be or’



PREV NEXT