sliceutils

package
v0.20.6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendWithoutDupes added in v0.7.11

func AppendWithoutDupes(a []string, b ...string) []string

returns a slice that consists of `a`, in order, followed by elements of `b` that are not in `a`

func BulletedIndentedStringList added in v0.10.14

func BulletedIndentedStringList(list []string) string

func DedupedAndSorted added in v0.5.1

func DedupedAndSorted(slice []string) (result []string)

Deduplicate and sort a slice of strings.

func EscapeAndJoin added in v0.17.5

func EscapeAndJoin(parts []string, opts EscapeSplitOptions) string

func QuotedStringList added in v0.8.3

func QuotedStringList(list []string) string

Quote each string in the list and separate them by commas.

func StringSliceEquals added in v0.6.0

func StringSliceEquals(a, b []string) bool

func StringSliceStartsWith added in v0.9.5

func StringSliceStartsWith(a []string, elem string) bool

StringSliceStartsWith returns true if slice A starts with the given elem.

func UnescapeAndSplit added in v0.17.5

func UnescapeAndSplit(s string, opts EscapeSplitOptions) ([]string, error)

Types

type EscapeSplitOptions added in v0.17.5

type EscapeSplitOptions struct {
	Delimiter  rune
	EscapeChar rune
}

func NewEscapeSplitOptions added in v0.17.5

func NewEscapeSplitOptions() EscapeSplitOptions

Jump to

Keyboard shortcuts

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