pstrings

package
v0.4.28 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: ISC Imports: 4 Imported by: 3

Documentation

Overview

pstrings provides FilteredJoin QuoteList StrSliceContains

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilteredJoin

func FilteredJoin(sList []string, separator ...string) (line string)

FilteredJoin is like strings.Join but ignores empty strings. defauklt separator is single space \x20

func FilteredJoinWithHeading added in v0.4.28

func FilteredJoinWithHeading(sList []string, separator ...string) (line string)

FilteredJoinWithHeading takes a string slice of heading-value pairs and only outputs those strings that are non-empty. {"head1", "first", "head2, ""} → "head1: first"

func IsDefaultValue

func IsDefaultValue(pt interface{}) (isDefault bool)

func QuoteList

func QuoteList(strs []string) string

QuoteList formats a string slice using %q into a single space-separated string

func StrSliceContains

func StrSliceContains(ss []string, s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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