str_util

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: BSD-3-Clause Imports: 2 Imported by: 2

Documentation

Overview

Package str_util contains basic string utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(s string) string

Normalize normalizes a string for compare. It does by converting to lowercase and removing extra whitespace between words as well as trimming any leading or trailing whitespace.

Types

type AutoComplete

type AutoComplete struct {
	// Items are the candidates so far with most recently added items at the end.
	// Clients should not modify directly.
	Items []string
	// contains filtered or unexported fields
}

AutoComplete keeps track of auto-complete candidates.

func (*AutoComplete) Add

func (a *AutoComplete) Add(s string)

Add adds another auto-complete candidate. If a candidate that equals s, ignoring case, has already been added then s is not added again. Also if s is the empty string, it is not added.

Jump to

Keyboard shortcuts

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