Read Complete File to Array of Lines
Suliman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 6 12:00:34 PDT 2014
I am trying to write simple parser, that split text to
key value
name = david
lastname = wood
here is my code:
foreach (line; readText(confname).splitLines())
{
writeln(line);
foreach (str; split(line, "="))
{
writeln(str);
}
}
now it's look like my code are put at str something wrong. I
tried to do writeln(str[0]) but it's put there only first letters
from first row.
Also could anybody help me to find example how create structure
and than fill it's with value field.
More information about the Digitalmars-d-learn
mailing list