Documentation
¶
Index ¶
- func Base64Decode(encodedStr string) (string, error)
- func Base64Encode(str string) string
- func ConvertKVToNestedMap(flatMap []*config.AppConfigKeyValue) map[string]interface{}
- func ConvertToNestedMap(flatMap map[string]string) map[string]interface{}
- func FindString(arr []string, target string) int
- func GetUrlArg(url, request string) string
- func GetUrlArgUnescape(urlString, request string) string
- func HashToString(str string) string
- func IsBase64(str string) bool
- func IsFileUrl(path string) bool
- func IsIPv4(address string) bool
- func IsIPv6(address string) bool
- func IsLink(path string) bool
- func RegFind(src string, match string) bool
- func RegGetMatch(src, pattern string, args ...*string) error
- func RegMatch(src, pattern string) bool
- func RegReplace(src, match, rep string, multiline bool) string
- func Str2Int(str string) int
- func Str2UInt16(str string) uint16
- func StringMapGet[T int | int32 | string | bool | float32](m map[string]interface{}, keys ...string) T
- func StringMapGetMapValue(m map[string]interface{}, keys ...string) map[string]interface{}
- func StringMapSet[T int | int32 | string | bool | float32](m map[string]interface{}, value T, keys ...string)
- func UrlSafeBase64Decode(encodedStr string) (string, error)
- func UrlSafeBase64Encode(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
Base64Decode decodes a Base64 encoded string.
func Base64Encode ¶
Base64Encode encodes a string using Base64 encoding.
func ConvertKVToNestedMap ¶
func ConvertKVToNestedMap(flatMap []*config.AppConfigKeyValue) map[string]interface{}
func ConvertToNestedMap ¶
ConvertToNestedMap 接收一个包含点分隔键的 map 并将其转换为嵌套的 map 结构
func FindString ¶
FindString 在字符串切片中查找一个元素,返回索引和是否找到的布尔值
func GetUrlArgUnescape ¶
func HashToString ¶
HashToString 模拟 C++ 的 hash_ 和 std::to_string
func RegGetMatch ¶
RegGetMatch 尝试在 src 中根据给定的正则表达式 pattern 匹配,并将匹配的分组结果赋给可变参数列表中的字符串指针。 如果匹配失败或分组数量与参数数量不匹配,将返回错误。
func RegReplace ¶
RegReplace performs regex-based replacements in the provided source string.
func Str2UInt16 ¶
func StringMapGet ¶
func StringMapGetMapValue ¶
func StringMapSet ¶
func UrlSafeBase64Decode ¶
UrlSafeBase64Decode decodes a URL-safe Base64 encoded string.
func UrlSafeBase64Encode ¶
UrlSafeBase64Encode encodes a string using URL-safe Base64 encoding without padding.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.