Tokenize a string: Difference between revisions

Content added Content deleted
imported>MattDESTROYER
imported>Arakov
Line 1,690: Line 1,690:


=={{header|Elena}}==
=={{header|Elena}}==
ELENA 4.x:
ELENA 6.x:
<syntaxhighlight lang="elena">import system'routines;
<syntaxhighlight lang="elena">import system'routines;
import extensions;
import extensions;
Line 1,696: Line 1,696:
public program()
public program()
{
{
var string := "Hello,How,Are,You,Today";
auto string := "Hello,How,Are,You,Today";
string.splitBy:",".forEach:(s)
string.splitBy(",").forEach::(s)
{
{
console.print(s,".")
console.print(s,".")