OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


SUBWORD




 >>--SUBWORD(string,n -+----------+-)-----><
                       +-,length--+

SUBWORD returns the substring of string that starts at the nth word, and 
is of length length, blank-delimited words. n must be a positive whole 
number. If you omit length, it defaults to the number of remaining words 
in string. The returned string never has leading or trailing blanks, but 
includes all blanks between the selected words. 
Here are some examples: 

SUBWORD('Now is the  time',2,2)    ->    'is the'
SUBWORD('Now is the  time',3)      ->    'the  time'
SUBWORD('Now is the  time',5)      ->    ''
  

Inf-HTML End Run - Successful