words

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBytes

func FromBytes(lang string, b []byte) ([]string, error)

FromBytes generates the list of words corresponding to a given sequence of bytes.

func FromPrefix

func FromPrefix(lang string, prefix string, max int) string

FromPrefix accepts a language and a prefix string and returns a sorted, space-separated list of words that match the given prefix. max can be used to limit the size of the returned list (if max <= 0 then all matches are returned, which could be up to 2K if the prefix is empty).

func ToBytes

func ToBytes(lang string, s []string) ([]byte, error)

ToBytes returns an array of the bytes a list of words corresponds to. It can error if lookup of any of the words fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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