stringslice

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StrAppendUnique

func StrAppendUnique(vs []string, toAdd string) []string

StrAppendUnique appends toAdd to the vs string slice if toAdd does not already exist in the slice. It returns the new or unchanged string slice.

func StrAppendUniques

func StrAppendUniques(vs []string, toAdd []string) []string

StrAppendUniques appends a slice of string values to the vs string slice. It only appends values that do not already exist in the slice. It returns the new or unchanged string slice.

func StrDelete

func StrDelete(vs []string, toDel string) []string

StrDelete returns the vs string slice with toDel values removed.

func StrFilter

func StrFilter(vs []string, f func(string) bool) []string

func StrInclude

func StrInclude(vs []string, t string) bool

func StrIndex

func StrIndex(vs []string, t string) int

func StrMap

func StrMap(vs []string, f func(string) string) []string

func StrUnique

func StrUnique(vs []string) []string

StrUnique returns the vs string slice with non-unique values removed.

func StringSliceToIntSlice

func StringSliceToIntSlice(ss []string) ([]int, error)

StringSliceToIntSlice converts a slice of strings to a slice of ints. Returns an error if any values cannot be parsed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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