[your code here]

Jos van Uden user at domain.invalid
Sat Jan 28 05:31:39 PST 2012


import std.stdio, std.stream, std.string, std.range;

void main() {
     int countPalindromes;
     auto infile = new BufferedFile("unixdict.txt");
     foreach (char[] line; infile) {
         if (line.walkLength > 1) {
             line.toLowerInPlace;
             if (line == line.dup.reverse)
                 countPalindromes++;
         }
     }
     writeln("palindromes found: ", countPalindromes);
}


More information about the Digitalmars-d mailing list