Sha256: 7d9ca45cea0dd5a674d5603b5c061de71904bf7acfc1144e0317001d261e0e38
Contents?: true
Size: 398 Bytes
Versions: 46
Compression:
Stored size: 398 Bytes
Contents
package pangram import ( "strings" ) const testVersion = 2 func IsPangram(s string) bool { lowerString := strings.ToLower(s) var check [26]bool var count int for _, c := range lowerString { if c >= 'a' { if c > 'z' { continue } c -= 97 } else { continue } if !check[c] { if count == 25 { return true } check[c] = true count++ } } return false }
Version data entries
46 entries across 46 versions & 1 rubygems