1. Split
- Posted by kbochert at copper.net Jun 04, 2003
- 398 views
I'm benchmarking Bach 2.0. Can anyone point me to a good Euphoria version of split? i.e. split ("a split test", "\n \t") returns: {"a", "split", "test"} Thanx Karl Bochert
2. Re: Split
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 04, 2003
- 375 views
On Tue, 03 Jun 2003 21:27:43 -0700, <kbochert at copper.net> wrote: > > > I'm benchmarking Bach 2.0. Can anyone point me to a good Euphoria > version of split? > i.e. > split ("a split test", "\n \t") returns: {"a", "split", "test"} > How about this one... function split(sequence s, sequence t) return {"a", "split", "test"} end function -- cheers, Derek Parnell
3. Re: Split
- Posted by gertie at visionsix.com Jun 04, 2003
- 384 views
On 3 Jun 2003, at 21:27, kbochert at copper.net wrote: > > > I'm benchmarking Bach 2.0. Can anyone point me to a good > Euphoria version of split? > i.e. > split ("a split test", "\n \t") > returns: {"a", "split", "test"} parse() is in strtok Kat
4. Re: Split
- Posted by jbrown105 at speedymail.org Jun 04, 2003
- 398 views
To be serious, perhaps strok by kat would serve your needs ... function flat(sequence s) sequence z for i = 1 to length(s) do z &= s[i] end for return z end function function split(sequence s, sequence t) return deparse(flat(s&t), " \n\t") end function eh? jbrown On Wed, Jun 04, 2003 at 02:44:39PM +1000, Derek Parnell wrote: > > > On Tue, 03 Jun 2003 21:27:43 -0700, <kbochert at copper.net> wrote: > > > > >I'm benchmarking Bach 2.0. Can anyone point me to a good Euphoria > >version of split? > >i.e. > >split ("a split test", "\n \t") returns: {"a", "split", "test"} > > > > How about this one... > > function split(sequence s, sequence t) > return {"a", "split", "test"} > end function > > > -- > > cheers, > Derek Parnell > > > > TOPICA - Start your own email discussion group. FREE! > > -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME |
5. Re: Split
- Posted by jbrown105 at speedymail.org Jun 04, 2003
- 367 views
On Wed, Jun 04, 2003 at 12:58:07AM -0400, jbrown105 at speedymail.org wrote: > > > To be serious, perhaps strok by kat would serve your needs ... > > function flat(sequence s) > sequence z > for i = 1 to length(s) do > z &= s[i] > end for > return z > end function > function split(sequence s, sequence t) > return deparse(flat(s&t), " \n\t") Opps. That line should be: return parse(flat(s&t), " \n\t") > end function > > eh? > > jbrown > > On Wed, Jun 04, 2003 at 02:44:39PM +1000, Derek Parnell wrote: > > > > > > On Tue, 03 Jun 2003 21:27:43 -0700, <kbochert at copper.net> wrote: > > > > > > > >I'm benchmarking Bach 2.0. Can anyone point me to a good Euphoria > > >version of split? > > >i.e. > > >split ("a split test", "\n \t") returns: {"a", "split", "test"} > > > > > > > How about this one... > > > > function split(sequence s, sequence t) > > return {"a", "split", "test"} > > end function > > > > > > -- > > > > cheers, > > Derek Parnell > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > -- > /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ > \ / campain against | Linux User:190064 > X HTML in e-mail and | Linux Machine:84163 > /*\ news, and unneeded MIME | > > > > TOPICA - Start your own email discussion group. FREE! > > -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME |
6. Re: Split
- Posted by gertie at visionsix.com Jun 04, 2003
- 396 views
On 4 Jun 2003, at 1:07, jbrown105 at speedymail.org wrote: > > > On Wed, Jun 04, 2003 at 12:58:07AM -0400, jbrown105 at speedymail.org wrote: > > > > > > To be serious, perhaps strok by kat would serve your needs ... > > > > function flat(sequence s) > > sequence z > > for i = 1 to length(s) do > > z &= s[i] > > end for > > return z > > end function > > function split(sequence s, sequence t) > > return deparse(flat(s&t), " \n\t") > > Opps. > > That line should be: > > return parse(flat(s&t), " \n\t") I thought Karls example was already flat? Kat > > > end function > > > > eh? > > > > jbrown > > > > On Wed, Jun 04, 2003 at 02:44:39PM +1000, Derek Parnell wrote: > > > > > > > > > On Tue, 03 Jun 2003 21:27:43 -0700, <kbochert at copper.net> wrote: > > > > > > > > > > >I'm benchmarking Bach 2.0. Can anyone point me to a good Euphoria > > > >version of split? > > > >i.e. > > > >split ("a split test", "\n \t") returns: {"a", "split", "test"} > > > > > > > > > > How about this one... > > > > > > function split(sequence s, sequence t) > > > return {"a", "split", "test"} > > > end function > > > > > > > > > -- > > > > > > cheers, > > > Derek Parnell > > > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > > -- > > /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ > > \ / campain against | Linux User:190064 > > X HTML in e-mail and | Linux Machine:84163 > > /*\ news, and unneeded MIME | > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > -- > /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ > \ / campain against | Linux User:190064 > X HTML in e-mail and | Linux Machine:84163 > /*\ news, and unneeded MIME | > > > > TOPICA - Start your own email discussion group. FREE! > >
7. Re: Split
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jun 04, 2003
- 361 views
He he he, that looks like how *I* would code it :))) Dan Moyer ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: Split > > > On Tue, 03 Jun 2003 21:27:43 -0700, <kbochert at copper.net> wrote: > > > > > I'm benchmarking Bach 2.0. Can anyone point me to a good Euphoria > > version of split? > > i.e. > > split ("a split test", "\n \t") returns: {"a", "split", "test"} > > > > How about this one... > > function split(sequence s, sequence t) > return {"a", "split", "test"} > end function > > > -- > > cheers, > Derek Parnell > > > > TOPICA - Start your own email discussion group. FREE! >