Documentation ¶
Overview ¶
Package grand provides high performance random string generation functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Digits ¶
Digits returns a random string which contains only digits, and its length is <n>.
func Intn ¶
Intn returns a int number which is between 0 and max - [0, max).
Note: 1. The result is greater than or equal to 0, but less than <max>; 2. The result number is 32bit and less than math.MaxUint32.
func Letters ¶
Letters returns a random string which contains only letters, and its length is <n>.
func Meet ¶
Meet randomly calculate whether the given probability <num>/<total> is met.
func MeetProb ¶
MeetProb randomly calculate whether the given probability is met.
func N ¶
N returns a random int between min and max - [min, max]. The <min> and <max> also support negative numbers.
func Perm ¶
Perm returns, as a slice of n int numbers, a pseudo-random permutation of the integers [0,n).
Types ¶
This section is empty.