Documentation
¶
Overview ¶
Package stringslice contains various functions to work with slices of strings and the strings contained within.
Index ¶
- func All(a []string, f predicate) bool
- func Any(a []string, f func(string) bool) bool
- func AppendIfNonEmpty(a []string, strings ...string) []string
- func Combine(slices ...[]string) []string
- func Copy(src []string) []string
- func Filter(a []string, f func(string) bool) []string
- func FilterFalse(a []string, f func(string) bool) []string
- func IndexOf(a []string, search string) (int, bool)
- func Map(a []string, f func(string) string) []string
- func NonEmpty(a []string) []string
- func Sorted(a ...string) []string
- func TotalDistance(a []string, b []string) (distance int, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfNonEmpty ¶
AppendIfNonEmpty appends the given string(s) to the slice if they are not the empty string.
func Combine ¶
Combine multiple slices into a single slice. This is equivalent to appending each slice in turn.
func FilterFalse ¶
FilterFalse returns the elements of a where f(a) is false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.