strutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MPL-2.0 Imports: 1 Imported by: 81

Documentation

Overview

DEPRECATED: this has been moved to go-secure-stdlib and will be removed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIfMissing

func AppendIfMissing(slice []string, i string) []string

func Difference

func Difference(a, b []string, lowercase bool) []string

func EqualStringMaps

func EqualStringMaps(a, b map[string]string) bool

func EquivalentSlices

func EquivalentSlices(a, b []string) bool

func GetString added in v0.2.0

func GetString(m map[string]interface{}, key string) (string, error)

func GlobbedStringsMatch

func GlobbedStringsMatch(item, val string) bool

func MergeSlices

func MergeSlices(args ...[]string) []string

func ParseArbitraryKeyValues

func ParseArbitraryKeyValues(input string, out map[string]string, sep string) error

func ParseArbitraryStringSlice

func ParseArbitraryStringSlice(input string, sep string) []string

func ParseDedupAndSortStrings

func ParseDedupAndSortStrings(input string, sep string) []string

func ParseDedupLowercaseAndSortStrings

func ParseDedupLowercaseAndSortStrings(input string, sep string) []string

func ParseKeyValues

func ParseKeyValues(input string, out map[string]string, sep string) error

func ParseStringSlice

func ParseStringSlice(input string, sep string) []string

func RemoveDuplicates

func RemoveDuplicates(items []string, lowercase bool) []string

func RemoveDuplicatesStable added in v0.1.10

func RemoveDuplicatesStable(items []string, caseInsensitive bool) []string

func RemoveEmpty

func RemoveEmpty(items []string) []string

func StrListContains

func StrListContains(haystack []string, needle string) bool

func StrListContainsCaseInsensitive added in v0.2.1

func StrListContainsCaseInsensitive(haystack []string, needle string) bool

func StrListContainsGlob

func StrListContainsGlob(haystack []string, needle string) bool

func StrListDelete

func StrListDelete(s []string, d string) []string

func StrListSubset

func StrListSubset(super, sub []string) bool

func TrimStrings

func TrimStrings(items []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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