Anonymous user
Tokenize a string: Difference between revisions
→{{header|Smalltalk}}: more
m (→{{header|Haskell}}: The wiki interpreted part of the program as Wikilink, which clearly wasn't intended) |
(→{{header|Smalltalk}}: more) |
||
Line 327:
=={{header|Smalltalk}}==
|array |
array :=
Some implementations also have a ''join:'' convenience method that allows the following shorter solution:
▲ [:concatenation :string | concatenation , string , '.'])
('Hello,How,Are,You,Today' subStrings: $,) join: '.'
The solution displaying a trailing period would be:
|array |
array := 'Hello,How,Are,You,Today' subStrings: $,.
array inject: '' into: [:concatenation :string | concatenation, string, '.' ]
=={{header|Standard ML}}==
|