Sha256: 2cc546e66ca48802e38dd142978fe0d79b42d45d261b65cf13ee6e3912ec9f54

Contents?: true

Size: 391 Bytes

Versions: 117

Compression:

Stored size: 391 Bytes

Contents

package pangram

import "strings"

// IsPangram checks if given string is a pangram
func IsPangram(s string) bool {
	var check [26]bool
	var count int
	for _, c := range strings.ToLower(s) {
		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

117 entries across 117 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/go/exercises/pangram/example.go
trackler-2.2.1.179 tracks/go/exercises/pangram/example.go
trackler-2.2.1.178 tracks/go/exercises/pangram/example.go
trackler-2.2.1.177 tracks/go/exercises/pangram/example.go
trackler-2.2.1.176 tracks/go/exercises/pangram/example.go
trackler-2.2.1.175 tracks/go/exercises/pangram/example.go
trackler-2.2.1.174 tracks/go/exercises/pangram/example.go
trackler-2.2.1.173 tracks/go/exercises/pangram/example.go
trackler-2.2.1.172 tracks/go/exercises/pangram/example.go
trackler-2.2.1.171 tracks/go/exercises/pangram/example.go
trackler-2.2.1.170 tracks/go/exercises/pangram/example.go
trackler-2.2.1.169 tracks/go/exercises/pangram/example.go
trackler-2.2.1.167 tracks/go/exercises/pangram/example.go
trackler-2.2.1.166 tracks/go/exercises/pangram/example.go
trackler-2.2.1.165 tracks/go/exercises/pangram/example.go
trackler-2.2.1.164 tracks/go/exercises/pangram/example.go
trackler-2.2.1.163 tracks/go/exercises/pangram/example.go
trackler-2.2.1.162 tracks/go/exercises/pangram/example.go
trackler-2.2.1.161 tracks/go/exercises/pangram/example.go
trackler-2.2.1.160 tracks/go/exercises/pangram/example.go