utils

package
v0.0.0-...-ac3b76c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(input string) string

func Base64Encode

func Base64Encode(input []byte) string

func BatchSearchToInt64Slice

func BatchSearchToInt64Slice(text string) []int64

BatchSearchToInt64Slice 批量搜索对字符串的分割

func BatchSearchToStringSlice

func BatchSearchToStringSlice(text string) []string

BatchSearchToStringSlice 批量搜索对字符串的分割

func DistinctI64

func DistinctI64(v []int64) []int64

DistinctI64 - 引入泛型前,为了类型安全暂时包一下 RemoveDuplicateElement

func DistinctStr

func DistinctStr(v []string) []string

DistinctStr - 引入泛型前,为了类型安全暂时包一下 RemoveDuplicateElement

func Get16BitStrMd5

func Get16BitStrMd5(str string) string

func InArray

func InArray(src string, arr []string) bool

func InArrayInt

func InArrayInt(d int, arr []int) bool

func MD5

func MD5(str string) string

MD5 generate md5 by string

func NewMkdir

func NewMkdir(path string) string

func NumToAsc

func NumToAsc(nums []int) string

NumToAsc 暂时仅支持大小写字母

func RandStringRunes

func RandStringRunes(n int) string

func RemoveDuplicateElement

func RemoveDuplicateElement(ori any) (any, error)

RemoveDuplicateElement slice去重

func RemoveHtmlTag

func RemoveHtmlTag(rawHtml string) (string, error)

RemoveHtmlTag 去除代码中的html标签

func Round

func Round(val float64, precision int) float64

Round 四舍五入 precision:需要的保留的小数位数

func SubStr

func SubStr(s string, l int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL