Well, technically speaking you could say it is correct.��On 01.05.2010 10:51, laurent laffont wrote:
In Pharo:
':' split: 'one:two:three:' �� => OrderedCollection( 'one' 'two' 'three' '' )
(':' split: 'one:two:three:') size => 4
Last element is an empty String
In Ruby:
>> 'one:two:three:'.split(':')
=> ["one", "two", "three"]
>> 'one:two:three:'.split(':').size
=> 3
Laurent Laffont
Does Ruby drop all empty subsequences?
ie:
('.' split: 'hah...hah') size gives 4 or 2?
Personally I'm more annoyed that:
(#great split: #(bad great bad great bad great bad)) size = 1, but:
(#(great) split: #(bad great bad great bad great bad)) size = 4
Cheers,
Henry
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project