rand

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

Index

Constants

View Source
const SeedAll = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
View Source
const SeedNum = "0123456789"

Variables

This section is empty.

Functions

func Float32

func Float32(min float32, max float32) float32

返回范围[min,max]内的随机浮点数。

func Int

func Int(min int, max int) int

返回范围[min,max]内的随机整数。

func Ints

func Ints(from, to, size int) []int

返回一个具有指定的from、to和size的随机整数数组

func RandStringDigit

func RandStringDigit(n int) string

func RandStringWordC

func RandStringWordC(n int) string

func RandStringWordL

func RandStringWordL(n int) string

func RandStringWordU

func RandStringWordU(n int) string

func RandomString

func RandomString(n int) string

func String

func String(seed string, length int) string

返回指定长度的随机字符串['a','z']

Types

This section is empty.

Jump to

Keyboard shortcuts

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