Documentation
¶
Index ¶
- Variables
- func CountOfString(s []string) map[string]int
- func EscapeSymbols(s, symbols string) string
- func ReverseStringSlice(s []string) []string
- func ReverseStringSliceInplace(s []string)
- func Split(slice string, letters string) []string
- func Str2Bytes(s string) []byte
- func UnEscaper() func(s string) string
- type ByValue
- type MultiKeyStringSlice
- type MultiKeyStringSliceList
- type ReversedByValue
- type ReversedString2ByteSliceList
- type ReversedStringCountList
- type SortType
- type String2ByteSlice
- type String2ByteSliceList
- type StringCount
- type StringCountList
Constants ¶
This section is empty.
Variables ¶
var IgnoreCase = false
IgnoreCase for ignoring case when sorting in natural order
var NaturalOrder = false
NaturalOrder is the global variable for sorting String2ByteSlice
Functions ¶
func CountOfString ¶
CountOfString returns the count of Key for a Key slice
func EscapeSymbols ¶
EscapeSymbols escape custom symbols
func ReverseStringSlice ¶
ReverseStringSlice reverses StringSlice
func ReverseStringSliceInplace ¶
func ReverseStringSliceInplace(s []string)
ReverseStringSliceInplace reverses StringSlice
Types ¶
type MultiKeyStringSlice ¶
MultiKeyStringSlice sort [][]string by multiple keys
type MultiKeyStringSliceList ¶
type MultiKeyStringSliceList []MultiKeyStringSlice
MultiKeyStringSliceList is slice of MultiKeyStringSlice
func (MultiKeyStringSliceList) Len ¶
func (list MultiKeyStringSliceList) Len() int
func (MultiKeyStringSliceList) Less ¶
func (list MultiKeyStringSliceList) Less(i, j int) bool
func (MultiKeyStringSliceList) Swap ¶
func (list MultiKeyStringSliceList) Swap(i, j int)
type ReversedString2ByteSliceList ¶
type ReversedString2ByteSliceList struct {
String2ByteSliceList
}
ReversedString2ByteSliceList is reversed String2ByteSliceList
func (ReversedString2ByteSliceList) Less ¶
func (list ReversedString2ByteSliceList) Less(i, j int) bool
Less ...
type ReversedStringCountList ¶
type ReversedStringCountList struct {
StringCountList
}
ReversedStringCountList is Reversed StringCountList
func (ReversedStringCountList) Less ¶
func (b ReversedStringCountList) Less(i, j int) bool
Less is different from the Less of StringCountList
type SortType ¶
type SortType struct { Index int IgnoreCase bool Natural bool // natural order Number bool UserDefined bool Reverse bool Levels map[string]int }
SortType defines the sort type
type String2ByteSlice ¶
String2ByteSlice is for sortint of string-[]byte pairs
type String2ByteSliceList ¶
type String2ByteSliceList []String2ByteSlice
String2ByteSliceList is list of string2ByteSlice
func (String2ByteSliceList) Len ¶
func (list String2ByteSliceList) Len() int
func (String2ByteSliceList) Less ¶
func (list String2ByteSliceList) Less(i, j int) bool
func (String2ByteSliceList) Swap ¶
func (list String2ByteSliceList) Swap(i, j int)
type StringCount ¶
StringCount is a struct store count of Key
type StringCountList ¶
type StringCountList []StringCount
StringCountList is slice of Keycount
func SortCountOfString ¶
func SortCountOfString(count map[string]int, reverse bool) StringCountList
SortCountOfString sorts count of Key
func (StringCountList) Len ¶
func (b StringCountList) Len() int
func (StringCountList) Less ¶
func (b StringCountList) Less(i, j int) bool
func (StringCountList) Swap ¶
func (b StringCountList) Swap(i, j int)