Documentation
¶
Index ¶
- func AppendStr(strs []string, str string) []string
- func CompareSliceStr(s1, s2 []string) bool
- func CompareSliceStrU(s1, s2 []string) bool
- func FindAddString(old, now []string) (diff []string)
- func FindElement(arr []interface{}) (newArr []interface{})
- func FindInt(old []int, now int) bool
- func FindSubString(old []string, now string) (diff []string)
- func IfZero(arg interface{}) bool
- func IsSliceContainsInt64(sl []int64, i int64) bool
- func IsSliceContainsStr(sl []string, str string) bool
- func RemoveElement(arr []interface{}, elem interface{}) []interface{}
- func RemoveInt(arr []int, elem int) []int
- func RemoveRepeatedElement(arr []interface{}) (newArr []interface{})
- func RemoveRepeatedFloat64(arr []float64) (newArr []float64)
- func RemoveRepeatedInt(arr []int) (newArr []int)
- func RemoveRepeatedString(arr []string) (newArr []string)
- func RemoveString(arr []string, elem string) []string
- func RemoveZero(slice []interface{}) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareSliceStr ¶
CompareSliceStr compares two 'string' type slices. It returns true if elements and order are both the same.
func CompareSliceStrU ¶
CompareSliceStrU compares two 'string' type slices. It returns true if elements are the same, and ignores the order.
func FindElement ¶
func FindElement(arr []interface{}) (newArr []interface{})
func IfZero ¶
func IfZero(arg interface{}) bool
判断一个值是否为零值,只支持string,float,int,time 以及其各自的指针,"%"和"%%"也属于零值范畴,场景是like语句
func IsSliceContainsInt64 ¶
IsSliceContainsInt64 returns true if the int64 exists in given slice.
func IsSliceContainsStr ¶
IsSliceContainsStr returns true if the string exists in given slice, ignore case.
func RemoveElement ¶
func RemoveElement(arr []interface{}, elem interface{}) []interface{}
func RemoveRepeatedElement ¶
func RemoveRepeatedElement(arr []interface{}) (newArr []interface{})
func RemoveRepeatedFloat64 ¶
func RemoveRepeatedInt ¶
func RemoveRepeatedString ¶
func RemoveString ¶
func RemoveZero ¶
func RemoveZero(slice []interface{}) []interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.