home *** CD-ROM | disk | FTP | other *** search
/ DTP Toolbox / DTPToolbox.iso / propage4.0 / arexx / itemtofront.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1992-03-15  |  266 b   |  18 lines

  1. /*
  2.     Item To Front
  3.     Puts an item to the front of a list
  4. */
  5.  
  6. parse arg item, list
  7.  
  8.  
  9. if item =  '' then return(list)
  10.  
  11. stringpos = pos(item, list)
  12. if stringpos ~= 0 then
  13. do
  14.     list = delstr(list, stringpos, length(item) + 1)
  15.     list = item || '0a'x || list
  16. end
  17. return(list)
  18.