[your code here]

Jos van Uden user at domain.invalid
Sat Feb 4 03:08:25 PST 2012

import std.string, std.traits, std.uni;

enum Alphabet : dstring {
     DE = "abcdefghijklmnopqrstuvwxyzßäöü",
     EN = "abcdefghijklmnopqrstuvwxyz",
     SV = "abcdefghijklmnopqrstuvwxyzåäö"

bool isPangram(S)(S s, dstring alpha = Alphabet.EN) if (isSomeString!S) {
     foreach (c; alpha)
         if (indexOf(s, c) == -1 && indexOf(s, toUpper(c)) == -1)
             return false;
     return true;


A pangram is a sentence that contains every letter of a given alphabet
at least once. A classic example is "The quick brown fox jumps over the 
lazy dog".

More information about the Digitalmars-d mailing list