Documentation ¶
Index ¶
- Variables
- type Node
- type Tried
- func (tried *Tried) Get(words string) interface{}
- func (tried *Tried) Has(words string) bool
- func (tried *Tried) HasPrefix(words string) bool
- func (tried *Tried) PrefixWords(words string) []string
- func (tried *Tried) Put(words string, values ...interface{})
- func (tried *Tried) String() string
- func (tried *Tried) Traversal(every func(cidx uint, value interface{}) bool)
- func (tried *Tried) WordsArray() []string
- type WordIndexType
Constants ¶
This section is empty.
Variables ¶
View Source
var WordIndexDict map[WordIndexType]*wordIndexStore
Functions ¶
This section is empty.
Types ¶
type Tried ¶
type Tried struct {
// contains filtered or unexported fields
}
func NewWithWordType ¶
func NewWithWordType(t WordIndexType) *Tried
NewWithWordType 选择单词的类型 WordIndexLower 意味着只支持小写
func (*Tried) PrefixWords ¶
func (*Tried) WordsArray ¶
type WordIndexType ¶
type WordIndexType int
WordIndexType 单词统计的类型 eg. WordIndexLower 意味Put的单词只支持小写...
const ( WordIndexLower WordIndexType WordIndexUpper WordIndexDigital WordIndexUpperLower WordIndexLowerDigital WordIndexUpperDigital WordIndexUpperLowerDigital WordIndex256 WordIndex32to126 )
Click to show internal directories.
Click to hide internal directories.