[your code here]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Jan 28 06:18:49 PST 2012


On 1/28/12 7:31 AM, Jos van Uden wrote:
> 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);
> }

Thanks, Jos.

We still don't have the code that randomly rotates the homepage samples. 
Any volunteers? If not, I'll implement it in Javascript.


Andrei


More information about the Digitalmars-d mailing list