trie

package
v0.0.0-...-cdc5ba6 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 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
}

Trie represents a set of labels.

func (*Trie) Add

func (t *Trie) Add(a []byte, label string)

Add inserts a word with a label into the trie.

func (*Trie) MatchPrefix

func (t *Trie) MatchPrefix(view []byte) string

MatchPrefix scans through the view until it finds a matching label.

Jump to

Keyboard shortcuts

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