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".

Reply via email to