[Pharo-users] Why is split: implemented in the separator rather than the string?

John Pfersich jpfersich at gmail.com
Thu May 19 23:18:09 EDT 2016


If you want to do it reversed, do it like this:

'1969-07-20' splitOn: '-'


> On May 19, 2016, at 11:48, Andy Burnett <andy.burnett at knowinnovation.com> wrote:
> 
> I keep getting this wrong, which makes me wonder why we send split: to the separator rather than the thing to be split. Is there a benefit to doing
> 
> $- split: '1969-07-20'
> 
> rather than
> 
> '1969-07-20' split: $-  (which somehow seems more natural to me).
> 
> Cheers
> Andy




More information about the Pharo-users mailing list