Documentation
¶
Index ¶
- func Copy(src []string) (dst []string)
- func SliceOfSlice(slices ...[]string) (sos [][]string)
- func SortReverseStable(s []string)
- func SortStable(s []string)
- func TruncateAppendHint(s string, max int, hint string) string
- func TruncatePrependHint(s string, max int, hint string) string
- type Set
- func (s *Set) Add(el string) bool
- func (s *Set) AddSet(other *Set)
- func (s *Set) AddSlice(slice []string) *Set
- func (s *Set) Clear()
- func (s *Set) Contains(el string) bool
- func (s *Set) Copy() *Set
- func (s *Set) Diff(other *Set) *Set
- func (s *Set) Equals(other *Set) bool
- func (s *Set) Len() int
- func (s *Set) Remove(el string) bool
- func (s *Set) Slice() []string
- func (s *Set) SortedReverseSlice() []string
- func (s *Set) SortedSlice() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SliceOfSlice ¶
func SortReverseStable ¶
func SortReverseStable(s []string)
func SortStable ¶
func SortStable(s []string)
func TruncateAppendHint ¶
Truncate returns the string with a maximum length enforced and optional appended hint (e.g. "...").
The truncate string and hint will fit inside the maximum length if possible.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func NewSet ¶
func NewSet() *Set
NewSet returns an initialized Set.
It returns a pointer to support use as a map's value type and avoid the "cannot call pointer method" error.
func (*Set) SortedReverseSlice ¶
func (*Set) SortedSlice ¶
Click to show internal directories.
Click to hide internal directories.