Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Splitting string based on substring separator

From: greggirwin:mindspring at: 23-Dec-2002 10:12

Hi Andreas, AB> And yes, I'd also like to see a rejoin/with ... I currently work with AB> something I called 'expand: AB> expand: func [ tokens delim /local res token ] [ AB> res: make block! (2 * length? tokens) AB> repeat token tokens [ AB> repend res [ (token) delim ] AB> ] AB> remove back tail res AB> rejoin res AB> ] Mine is nearly identical to your Andreas, with one small change; I MOLD the token, if it contains the delimiter, when I append it. -- Gregg