stringutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, element string) bool

func ContainsStringWithPrefix

func ContainsStringWithPrefix(slice []string, prefix string) bool

func Equal

func Equal(a, b []string) bool

func JoinNonEmpty

func JoinNonEmpty(elems []string, sep string) string

JoinNonEmpty does the same as strings.Join but omits empty elements

func JoinSlices

func JoinSlices(sep string, slices ...[]string) []string

func NonEmpty

func NonEmpty(elems []string) []string

NonEmpty returns a slice with all empty strings removed

func PrettyString

func PrettyString(v interface{}) string

func QuotedStrings

func QuotedStrings(elems []string) []string

func SubtractSlices

func SubtractSlices(a, b []string) (diff []string)

func ToJsonString

func ToJsonString(v interface{}) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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