Documentation
¶
Index ¶
- func FilterEmpty(elems []string) []string
- func If(flag bool, trueValue string) string
- func IfElse(flag bool, trueValue, falseValue string) string
- func Indent(prepend, str string) string
- func JoinStringers[T fmt.Stringer](delim string, args ...T) string
- func Lines(s string) []string
- func MapAndJoin[T any](fn func(T) string, delim string, args ...T) string
- func WithSep(a string, separator string, b string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterEmpty ¶
FilterEmpty removes empty strings from the given slice.
func Indent ¶
Indent prepends a string to every line of the given string.
If the string ends in a newline, the resulting string also ends in a newline.
func JoinStringers ¶
JoinStringers concatenates the string representations of the given fmt.Stringer implementations.
func MapAndJoin ¶
MapAndJoin converts each argument to a string using the given function and joins the strings with the given delimiter.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.