util

package
v0.0.0-...-40ef913 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesString

func BytesString(b []byte) string

BytesString 高效[]byte转string

func GetRandStr

func GetRandStr() (r []byte)

GetRandStr 获取随机字符串 几乎不会重复,这个'几乎'你可以当成'肯定'用 假若发生了重复,建议你去买张彩票

func InArray

func InArray(sub, large interface{}) (r interface{})

InArray 判断sub是否在large中,返回多的部分, 参数为数组或切片

func KeepFloat

func KeepFloat(v float64, n int) float64

KeepFloat 保留n位小数

func StringBytes

func StringBytes(s string) []byte

StringBytes 高效string转[]byte

func StringsJoin

func StringsJoin(sep string, ss ...string) string

StringsJoin 高效连接字符串

func SubStr

func SubStr(str string, start int, length ...int) string

SubStr 截取字符串

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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