MCPcopy
hub / github.com/lmorg/murex / IsInDictionary

Function IsInDictionary

utils/spellcheck/userdictionary/userdictionary.go:17–26  ·  view source on GitHub ↗

IsInDictionary checks if word is in user dictionary

(word string)

Source from the content-addressed store, hash-verified

15
16// IsInDictionary checks if word is in user dictionary
17func IsInDictionary(word string) bool {
18 s := strings.ToLower(word)
19 for i := range dictionary {
20 if s == strings.ToLower(dictionary[i]) {
21 return true
22 }
23 }
24
25 return false
26}
27
28// Get returns a copy of the slice dictionary
29func Get() []string {

Callers 2

StringFunction · 0.92
TestIsInFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsInFunction · 0.68