stringutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 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 MaxLen added in v0.4.0

func MaxLen(elems []string) int

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) []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