exercism/go/pangram/pangram.go

21 lines
290 B
Go
Raw Normal View History

2016-11-27 04:10:28 +00:00
package pangram
import "strings"
const testVersion = 1
func IsPangram(inp string) bool {
used := make(map[rune]int)
inp = strings.ToLower(inp)
for _, l := range inp {
used[l] = used[l] + 1
}
for i := 'a'; i <= 'z'; i++ {
if used[i] == 0 {
return false
}
}
return true
}