stringutil

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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