On 2013-02-20, at 09:26, Frank Shearar <frank.shearar@gmail.com> wrote:
On 20 Feb 2013, at 0:49, Chris Cunningham <cunningham.cb@gmail.com> wrote:
On Tue, Feb 19, 2013 at 3:28 PM, Frank Shearar <frank.shearar@gmail.com> wrote: <snip>
It is indeed strange behavior, but I think we inherited that from squeak.
No, Squeak has (since 2005) had still another behaviour:
';;;;' subStrings: ';' '1;2;3' subStrings: ';' #('1' '2' '3')
(Note the ';' rather than $;, because Squeak's version takes a String of separators.)
frank
Yes, but it still has the odd behavior:
';;;;' subStrings: ';' => $( ) '1;2;;3' subStrings: ';' => #('1' '2' '3')
And the separators don't have to be strings - they can be any collection of characters.
Chris
To make my point more clearly perhaps I should have shown that in Squeak you can't use a Character argument to subStrings:, in contrast to the examples.
neither in Pharo.. so they are 100% the same, since I can go back to Pharo 1.0 without any version history of the method.