utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Seed = uint32(1)
)

Functions

func Decoder

func Decoder(data []byte, v interface{})

func DeleteArray

func DeleteArray(array []uint32, index int) []uint32

func DirSizeB

func DirSizeB(path string) int64

DirSizeB DirSizeMB getFileSize get file size by path(B)

func Encoder

func Encoder(data interface{}) []byte

func ExecTime

func ExecTime(fn func()) float64

func ExecTimeWithError

func ExecTimeWithError(fn func() error) (float64, error)

func Murmur3

func Murmur3(key []byte) (hash uint32)

func QuickSortAsc

func QuickSortAsc(arr []int, start, end int, cmp func(int, int))

QuickSortAsc 快速排序

func ReleaseAssets

func ReleaseAssets(file fs.File, out string)

func RemovePunctuation

func RemovePunctuation(str string) string

RemovePunctuation 移除所有的标点符号

func RemoveSpace

func RemoveSpace(str string) string

RemoveSpace 移除所有的空格

func StringToInt

func StringToInt(value string) uint32

StringToInt 字符串转整数

func Uint32Comparator

func Uint32Comparator(a, b interface{}) int

func Uint32ToBytes

func Uint32ToBytes(i uint32) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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