trie

package
v2.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 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 Set added in v2.0.16

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

func NewTrieSet

func NewTrieSet() *Set

func (*Set) Add added in v2.0.16

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

func (*Set) Exists added in v2.0.16

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

func (*Set) HasKey added in v2.0.16

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

func (*Set) Length added in v2.0.16

func (ts *Set) Length() int64

func (*Set) ReplaceKey added in v2.0.16

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

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)

Jump to

Keyboard shortcuts

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