IsInDictionary checks if word is in user dictionary
(word string)
| 15 | |
| 16 | // IsInDictionary checks if word is in user dictionary |
| 17 | func 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 |
| 29 | func Get() []string { |