Documentation ¶
Index ¶
- Variables
- func B2S(b []byte) string
- func Base64Decode(data string) ([]byte, error)
- func Base64Encode(data []byte) string
- func CombineStrings(elems ...string) string
- func Has[T comparable](s []T, x T) bool
- func HexBeautify(src []byte) string
- func IsEqual[T comparable](a, b []T) bool
- func MapToString(object map[string]any) string
- func Reverse[T any](s *[]T)
- func S2B(s string) (b []byte)
- func SetJsonEngine(api jsoniter.API)
- func WordCapitalize(word string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FasterJson 更快的配置,浮点数仅能保留6位小数, 且不能序列化HTML FasterJson = jsoniter.ConfigFastest FasterJsonMarshal = FasterJson.Marshal FasterJsonUnmarshal = FasterJson.Unmarshal // DefaultJson 默认配置 DefaultJson = FasterJson JsonMarshal = DefaultJson.Marshal JsonUnmarshal = DefaultJson.Unmarshal JsonMarshalIndent = DefaultJson.MarshalIndent JsonNewDecoder = DefaultJson.NewDecoder JsonNewEncoder = DefaultJson.NewEncoder )
View Source
var ( F = CombineStrings StringsJoin = CombineStrings )
Functions ¶
func CombineStrings ¶
CombineStrings 合并字符串, 实现等同于strings.Join(),只是少了判断分隔符
func Has ¶
func Has[T comparable](s []T, x T) bool
Has 查找序列s内是否存在元素x
@param s []T 查找序列 @param x T 特定元素 @return bool true if s contains x, false otherwise
func IsEqual ¶
func IsEqual[T comparable](a, b []T) bool
IsEqual 判断2个切片是否相等
@return true if is equal
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.