B
Bertram Scharpf
Hi,
wouldn't it be a good idea to have a method doing this:
['a','b','','c','d','','e'].split ''
#=> [['a','b'],['c','d'],['e']]
I wrote this method for my program in Ruby, but if you were
interested in integrating it into the language, I would
like to contribute it to `array.c'.
I made both solutions available at
<http://projects.bertram-scharpf.de/tmp/arraysplit.tar.gz>.
Bertram
P.S.: For those who look at the C code: is it OK not to
destroy the last `cur' object?
wouldn't it be a good idea to have a method doing this:
['a','b','','c','d','','e'].split ''
#=> [['a','b'],['c','d'],['e']]
I wrote this method for my program in Ruby, but if you were
interested in integrating it into the language, I would
like to contribute it to `array.c'.
I made both solutions available at
<http://projects.bertram-scharpf.de/tmp/arraysplit.tar.gz>.
Bertram
P.S.: For those who look at the C code: is it OK not to
destroy the last `cur' object?