Tokenize a string: Difference between revisions
Content deleted Content added
Added Nemerle |
|||
Line 770:
In use:<pre>USER>D TOKENS^ROSETTA
Hello.how.are.you.today</pre>
=={{header|Nemerle}}==
<lang Nemerle>using System;
using System.Console;
using Nemerle.Utility.NString;
module Tokenize
{
Main() : void
{
def cswords = "Hello,How,Are,You,Today";
WriteLine(Concat(".", $[s | s in cswords.Split(',')]));
// Split() produces an array while Concat() consumes a list
// a quick in place list comprehension takes care of that
}
}</lang>
=={{header|Objective-C}}==
|