3c1 @verb #9659:"wrap" this none this rxdo #9659 @program #9659:"wrap" this none this {text, col, ?ignore_html = 0} = args new = {} for line in ({@text}) $command_utils:suspend_if_needed(0) new = {@new, ""} wid = 0 totpos = 1 text = ignore_html ? $html_utils:html2token(text) | text while (totpos <= length(text)) if (`text[totpos][1] == "<" && text[totpos][$] == ">" ! ANY => 0') new[$] = new[$] + text[totpos] else temp = text[totpos] while (temp) tt = length(temp) ins = col - wid `new[$] = new[$] + temp[1..ins] ! ANY => (new[$] = new[$] + temp) && (ins = tt)' wid = wid + ins if (wid >= col) new = {@new, ""} wid = 0 endif temp = `temp[ins + 1..$] ! E_RANGE => ""' endwhile endif totpos = totpos + 1 endwhile endfor return new "Last modified by Michael (#9659) on Thu Aug 24 01:04:24 2000 MDT." . 0