Documentation ¶
Index ¶
- Constants
- func BinarySearchIndexOf(strs []string, char string) bool
- func BubbleAscSort(strs []string) []string
- func BubbleDescSort(strs []string) []string
- func Compare(a, b []string) bool
- func Contains(strs []string, char string) bool
- func IndexOf(strs []string, char string) int
- func JoinStringsInASCII(data map[string]string, sep string, onlyValues, includeEmpty bool, ...) string
Constants ¶
View Source
const (
IndexNotFound = -1 // 数组中元素未找到的下标,值为-1
)
Variables ¶
This section is empty.
Functions ¶
func BinarySearchIndexOf ¶
BinarySearchIndexOf 二分查找是否存在元素
func IndexOf ¶
IndexOf 返回数组中指定元素所在位置,未找到返回IndexNotFound *
- @param strs 字符串数组
- @param char 被检查的元素
- @return 数组中指定元素所在位置,未找到返回IndexNotFound
func JoinStringsInASCII ¶
func JoinStringsInASCII(data map[string]string, sep string, onlyValues, includeEmpty bool, exceptKeys ...string) string
JoinStringsInASCII 将map数据key以ASCII码从小到大排序后拼接 *
- @param data 待拼接的数据
- @param sep 连接符
- @param onlyValues 是否只包含参数值,true则不包含参数名,否则参数名和参数值均有
- @param includeEmpty 是否包含空值,true则包含空值,否则不包含,注意此参数不影响参数名的存在
- @param exceptKeys 被排除的参数名,不参与排序及拼接
- @return 返回URL类型的参数字符串
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.