trie

package
v2.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

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

func New

func New() *Trie

func (*Trie) Get

func (t *Trie) Get(key string) (value any, exists bool)

func (*Trie) Length

func (t *Trie) Length() int64

func (*Trie) Set

func (t *Trie) Set(key string, value any) (isNew bool)

type TrieSet

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

func NewTrieSet

func NewTrieSet() *TrieSet

func (*TrieSet) Add

func (ts *TrieSet) Add(key string) (isNew bool)

func (*TrieSet) Exists

func (ts *TrieSet) Exists(key string) (exists bool)

func (*TrieSet) HasKey

func (ts *TrieSet) HasKey(words string) bool

func (*TrieSet) Length

func (ts *TrieSet) Length() int64

func (*TrieSet) ReplaceKey

func (ts *TrieSet) ReplaceKey(words string, starChar byte) (newWords string)

Jump to

Keyboard shortcuts

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