(words []string)
| 67 | } |
| 68 | |
| 69 | func readRunes(words []string) [][]rune { |
| 70 | var dict [][]rune |
| 71 | |
| 72 | for _, word := range words { |
| 73 | word = strings.ToLower(word) |
| 74 | l := bytes.TrimSpace([]byte(word)) |
| 75 | dict = append(dict, bytes.Runes(l)) |
| 76 | } |
| 77 | |
| 78 | return dict |
| 79 | } |
| 80 | |
| 81 | func AcSearch(findText string, dict []string, stopImmediately bool) (bool, []string) { |
| 82 | if len(dict) == 0 { |