Documentation ¶
Index ¶
- func Contains(slice []string, s string) bool
- func Intersection(s1, s2 []string) []string
- func Split(s []string, f SplitFilter) ([]string, []string)
- func ToSlice(v interface{}) []string
- func ToString(v interface{}) (string, bool)
- func Unique(s []string) []string
- type SortedSlice
- func (slice SortedSlice) Contains(s string) bool
- func (slice SortedSlice) Difference(second SortedSlice) SortedSlice
- func (slice SortedSlice) Equal(second SortedSlice) bool
- func (slice SortedSlice) Insert(elems ...string) SortedSlice
- func (slice SortedSlice) Intersection(second SortedSlice) SortedSlice
- func (slice SortedSlice) IsSubslice(s SortedSlice) bool
- func (slice SortedSlice) IsSuperslice(s SortedSlice) bool
- func (slice SortedSlice) Remove(elems ...string) SortedSlice
- type SplitFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Intersection ¶
Return slice of unique elements contained by both input slices
Types ¶
type SortedSlice ¶
type SortedSlice []string
Sorted slice of strings without duplicates
func MakeSortedSlice ¶
func MakeSortedSlice(slice []string) SortedSlice
func (SortedSlice) Contains ¶
func (slice SortedSlice) Contains(s string) bool
func (SortedSlice) Difference ¶
func (slice SortedSlice) Difference(second SortedSlice) SortedSlice
Get elements of the first slice not contained in the second
func (SortedSlice) Equal ¶
func (slice SortedSlice) Equal(second SortedSlice) bool
Equality check for two sorted string slices
func (SortedSlice) Insert ¶
func (slice SortedSlice) Insert(elems ...string) SortedSlice
func (SortedSlice) Intersection ¶
func (slice SortedSlice) Intersection(second SortedSlice) SortedSlice
func (SortedSlice) IsSubslice ¶
func (slice SortedSlice) IsSubslice(s SortedSlice) bool
Check if slice is a subslice of s (ie. all elements in slice are contained by s)
func (SortedSlice) IsSuperslice ¶
func (slice SortedSlice) IsSuperslice(s SortedSlice) bool
Check if slice is a superslice of s
func (SortedSlice) Remove ¶
func (slice SortedSlice) Remove(elems ...string) SortedSlice
type SplitFilter ¶
Click to show internal directories.
Click to hide internal directories.