From: Roelof Wobben
Subject: Re: [Pharo-users] uses or instead of a searching literal
Date: 28 December 2019 at 09:35:17 GMT+1
To: pharo-users@lists.pharo.org
yep. Im aware of this tool but on this case nothing pops up.
Roelof
Op 28-12-2019 om 09:22 schreef Kasper Østerbye:
Are you aware
I would go for
'Portable Network Graphics' findTokens: ' -_'.
> On 28 Dec 2019, at 09:35, Roelof Wobben via Pharo-users
> wrote:
>
>
> From: Roelof Wobben
> Subject: Re: [Pharo-users] uses or instead of a searching literal
> Date: 28 December
--- Begin Message ---
yep. Im aware of this tool but on this
case nothing pops up.
Roelof
Op 28-12-2019 om 09:22 schreef Kasper Østerbye:
Are you
aware of the ‘finder’ tool?, in particular the ‘exa
Are you aware of the ‘finder’ tool?, in particular the ‘examples' mode is
useful.
try: ‘aaa_bbb-ccc’. ‘_-‘. #(‘aaa’ ‘bbb’ ‘ccc’)
Best,
Kasper
On 28 December 2019 at 08.12.03, Roelof Wobben via Pharo-users (
pharo-users@lists.pharo.org) wrote:
Op 27-12-2019 om 23:33 schreef Richard O'Keefe:
>
--- Begin Message ---
Op 27-12-2019 om 23:33 schreef Richard O'Keefe:
aString splitOn: ' -_' asSet
Hello Richard,
Thanks again , I find this "aString splitOn: '_- ` asSet " much
cleaner but on some way I does not split for example 'Portable Network
Graphics' into " #(Portable, Netwo
You know, this is an area where style opinions differ a lot.
What the message is suggesting you try is
aString splitOn: [:each | ' -_' includes: each]
That's all. No need for anything more complicated.
But there is a trade-off. Clarity vs efficiency. You should make your
code clear and correct
Since you're splitting a String, why not use a Regex to do this?
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html