strs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelExtraSpace

func DelExtraSpace(src string) string

DelExtraSpace 压缩字符串,删除字符串中的多余空格,有多个空格时,仅保留一个空格,可用于将已格式化的json字符串压缩

func RandString

func RandString(len int) (s string)

RandString 随机生成len位数的随机数,比如len=6则生成6位随机数, 需要配合init()方法中的rand.Seed(time.Now().Unix())使用

func StrPreAndSufIsContainFixStr

func StrPreAndSufIsContainFixStr(str string, fixStr string) bool

StrPreAndSufIsContainFixStr 判断传入的字符串str首或尾是否包含fixStr字符串,如果包含返回true

func UUID4

func UUID4() string

UUID4 生成随机UUID4

Types

This section is empty.

Jump to

Keyboard shortcuts

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