tried

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WordIndexDict map[WordIndexType]*wordIndexStore

Functions

This section is empty.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

type Tried

type Tried struct {
	// contains filtered or unexported fields
}

func New

func New() *Tried

New 默认 WordIndexLower 意味着只支持小写

func NewWithWordType

func NewWithWordType(t WordIndexType) *Tried

NewWithWordType 选择单词的类型 WordIndexLower 意味着只支持小写

func (*Tried) Get

func (tried *Tried) Get(words string) interface{}

func (*Tried) Has

func (tried *Tried) Has(words string) bool

func (*Tried) HasPrefix

func (tried *Tried) HasPrefix(words string) bool

func (*Tried) PrefixWords

func (tried *Tried) PrefixWords(words string) []string

func (*Tried) Put

func (tried *Tried) Put(words string, values ...interface{})

func (*Tried) String

func (tried *Tried) String() string

func (*Tried) Traversal

func (tried *Tried) Traversal(every func(cidx uint, value interface{}) bool)

func (*Tried) WordsArray

func (tried *Tried) WordsArray() []string

type WordIndexType

type WordIndexType int

WordIndexType 单词统计的类型 eg. WordIndexLower 意味Put的单词只支持小写...

const (
	WordIndexLower WordIndexType
	WordIndexUpper
	WordIndexDigital
	WordIndexUpperLower
	WordIndexLowerDigital
	WordIndexUpperDigital
	WordIndexUpperLowerDigital
	WordIndex256
	WordIndex32to126
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL