Sha256: adc3b46e05676cec49c1008ae3d7bc954aa18442990b4aab0b036199021094a5
Contents?: true
Size: 557 Bytes
Versions: 150
Compression:
Stored size: 557 Bytes
Contents
#include "pangram.h" #include <cctype> namespace { bool found_letter(char a, const std::string &s) { for(auto c: s) { if(tolower(c) ==a) { return true; } } return false; } } namespace pangram { bool is_pangram(const std::string &s) { char letters[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; for(char l : letters) { if(!found_letter(l, s)) { return false; } } return true; } }
Version data entries
150 entries across 150 versions & 1 rubygems