Documentation ¶
Overview ¶
Package trie holds implementations of a simple trie and of a ternary search trie.
Package trie holds implementations of a simple trie and of a ternary search trie.
Index ¶
- type TernaryST
- func (t *TernaryST) Get(key string) (interface{}, bool)
- func (t *TernaryST) Keys() []string
- func (t *TernaryST) KeysMatching(key string) []string
- func (t *TernaryST) KeysWithPrefix(key string) []string
- func (t *TernaryST) Len() int
- func (t *TernaryST) LongestPrefix(key string) string
- func (t *TernaryST) Put(key string, val interface{})
- type Trie
- type TrieSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TernaryST ¶
type TernaryST struct {
// contains filtered or unexported fields
}
TernaryST is a symbol table specifically for string indexed keys.
func (*TernaryST) KeysMatching ¶
KeysMatching returns all the keys that share prefix `key`, where `key` can contain a wildcard character `.`.
func (*TernaryST) KeysWithPrefix ¶
KeysWithPrefix returns all the keys starting with prefix `key`
func (*TernaryST) LongestPrefix ¶
LongestPrefix returns the longest string in this trie that has `key` for prefix
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
Trie is a symbol table specifically for string indexed keys.
Click to show internal directories.
Click to hide internal directories.