[ENH] String splitting
Stefan Matthias Aust
sma at 3plus4.de
Sat Jul 1 09:26:34 UTC 2000
At 10:06 29.06.00 -0400, Bolot Kerimbaev wrote:
>Perhaps String>>findTokens: would work? It takes a collection of
>Characters (e.g., String) as a parameter:
>
>('aloha;bloha;cloha' findTokens: ';') do: [:str | ...]
It not only does what one might want. For example
('aloha;;bloha;cloha' findTokens: ';')
should probably result in a 4-element array, the second element being
''. Frank's method works that way to both methods are useful. (It
contains a superfluous #copy, btw, and I'd suggest to rename it to
subStrings: which is the ANSI conform name)
bye
--
Stefan Matthias Aust // Bevor wir fallen, fallen wir lieber auf
More information about the Squeak-dev
mailing list
|