/* rexx illustrates a method for clipping a string iteratively. */ str = "word by night of the best in things we better not have to do" do while Length(str) > 22 pt = lastpos(' ',str,22) /* locate a blank */ parse var str front =(pt) str /* clip at the blank */ str = Strip(str) /* strip trailing */ say ">"front"<" end say ">"str"<" exit