Jump to content

Tokenize a string: Difference between revisions

(→‎[[JavaScript]]: Make it a one-liner)
Line 253:
 
tokens := split("Hello,How,Are,You,Today", ",");
 
==[[Smalltalk]]==
[[Category:Smalltalk]]
 
|array |
array := ('Hello,How,Are,You,Today' findTokens: $,) asArray.
Transcript show:
(array inject: ''
into:
[:concatenation :string | concatenation , string , '.'])
 
==[[Standard ML]]==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.