Documentation ¶
Index ¶
- Variables
- func Abs[T PositiveNegativeNumeral](a T) T
- func AppendWithUniqueItem[T Comparable](srcArray []T, items ...T) (result []T)
- func ConvertChNumberToArNumber(inputStrNum string) (ansNum int)
- func CopyFields(src any, dst any, consistWithSrc ...bool) (err error)
- func CopyFieldsWithNameArray(src any, dst any, names []string) (err error)
- func Equal[T Comparable](a []T, b []T) bool
- func ExtractFirstCaptureData(src []byte, toFind string) (ret []byte, ok bool)
- func GetCaptureBytes(data []byte, submatchIndexs []int, index int) (result []byte)
- func GetCharOfStringWithIndex(src string, index int) (result string, size int)
- func GetExecParentDir() (result string, err error)
- func GetFirstCharOfString(src string) (result string, size int)
- func GetGroupIndexPair(index int) (groupBegin, groupEnd int)
- func GetUniqueValueArray[T Comparable](valueArray []T) []T
- func GetUniqueValueArrayExcludingACertain[T Comparable](valueArray []T, certain T) []T
- func InterfaceIsNil(i interface{}) bool
- func IsDir(path string) bool
- func IsInSlice[T Comparable](srcArray []T, item T) bool
- func JoinBytes(sep []byte, pBytes ...[]byte) []byte
- func MapToStruct(m map[string]interface{}, s interface{}) error
- func Max[T IntegerComparable](a, b T) T
- func MergeMap[T Comparable](src map[T]interface{}, others ...map[T]interface{}) map[T]interface{}
- func MergeStringMap(src map[string]interface{}, others ...map[string]interface{}) map[string]interface{}
- func Min[T IntegerComparable](a, b T) T
- func Reverse(slice interface{})
- func ToInt(value interface{}) (int, bool)
- func ToString(value interface{}) (string, bool)
- type Comparable
- type IntegerComparable
- type PositiveNegativeNumeral
Constants ¶
This section is empty.
Variables ¶
View Source
var ChToArNumberMap = map[string]int{
"零": 0,
"一": 1,
"二": 2,
"三": 3,
"四": 4,
"五": 5,
"六": 6,
"七": 7,
"八": 8,
"九": 9,
}
数值对应表
Functions ¶
func Abs ¶ added in v0.2.3
func Abs[T PositiveNegativeNumeral](a T) T
func AppendWithUniqueItem ¶
func AppendWithUniqueItem[T Comparable](srcArray []T, items ...T) (result []T)
func ConvertChNumberToArNumber ¶ added in v0.2.6
ConvertChNumberToArNumber 中文数字转阿拉伯数字
func CopyFields ¶ added in v0.3.3
调用时需要确保src和dst是指针类型
func CopyFieldsWithNameArray ¶ added in v0.3.3
调用时需要确保src和dst是指针类型
func Equal ¶
func Equal[T Comparable](a []T, b []T) bool
func ExtractFirstCaptureData ¶
func GetCaptureBytes ¶
func GetCharOfStringWithIndex ¶ added in v0.2.5
func GetExecParentDir ¶ added in v0.3.1
func GetFirstCharOfString ¶ added in v0.2.4
func GetGroupIndexPair ¶
func GetUniqueValueArray ¶
func GetUniqueValueArray[T Comparable](valueArray []T) []T
func GetUniqueValueArrayExcludingACertain ¶
func GetUniqueValueArrayExcludingACertain[T Comparable](valueArray []T, certain T) []T
func InterfaceIsNil ¶
func InterfaceIsNil(i interface{}) bool
func MapToStruct ¶ added in v0.2.9
func Max ¶
func Max[T IntegerComparable](a, b T) T
func MergeMap ¶
func MergeMap[T Comparable](src map[T]interface{}, others ...map[T]interface{}) map[T]interface{}
func MergeStringMap ¶
func Min ¶
func Min[T IntegerComparable](a, b T) T
Types ¶
type Comparable ¶
type IntegerComparable ¶
Click to show internal directories.
Click to hide internal directories.