utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 3 Imported by: 0

README

utils

工具箱, 集合各种常用类型

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Head(str, sep string) (head string, tail string)

func RandString

func RandString(n int, randType RandStringType) string

func StringReverse

func StringReverse(s string) string

func ToNumber

func ToNumber[T int8 | int16 | int | int32 | int64](str string) T

func ToString

func ToString(val interface{}) string

Types

type RandStringType

type RandStringType int
const (
	Number RandStringType = iota // 数字
	Letter                       // 小写数字
	Mix                          // 大小写数字混合
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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