smalltalk - How to camelCase a String in Pharo? -


i'm trying from:

'hello how today' 

to

'hellohowareyoutoday' 

and thought ascapitalizedphrase aslegalselector trick, doesn't.

what's proper way this?

edit:

i think should clarify question; have way transform string camelcase selector:

|astring acamelcasestring| astring := astring findtokens: $ . acamelcasestring := astring first. astring allbutfirst do: [:each | acamelcasestring := acamelcasestring , each capitalized]. 

i wondering whether pharo has standard system method achieve same :)

you don't version of pharo you're using, in stable 5.0,

'hello world selector' ascamelcase asvalidselector 

yields

helloworldthisisaselector 

to i'm using run:

curl get.pharo.org/50+vm | bash  

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -