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

[REBOL] Re: Find? Copy/Part?

From: ptretter::charter::net at: 18-Jan-2005 15:14

str: "aaa*aaa*aaa*aaa" myfunc: func [string section /mod][ mod: copy str loop section [mod: find next mod "*"] return mod ] Now you can get to any section you want not just the second one.
>> myfunc str 2
== "*aaa*aaa"
>> myfunc str 3
== "*aaa"
>>
Paul Tretter