MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / IsPangram

Function IsPangram

strings/pangram/ispangram.go:21–31  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

19}
20
21func IsPangram(text string) bool {
22 cleanText := cleanString(text)
23 if len(cleanText) < 26 {
24 return false
25 }
26 var data = make(map[rune]bool)
27 for _, i := range cleanText {
28 data[i] = true
29 }
30 return len(data) == 26
31}

Callers 1

TestIsPangramFunction · 0.85

Calls 1

cleanStringFunction · 0.70

Tested by 1

TestIsPangramFunction · 0.68