Documentation ¶
Overview ¶
Package sdrand 随机工具扩展
Index ¶
- Variables
- func Bytes(n int) sdbytes.Slice
- func Float64Between(low, high float64) float64
- func Int64Between(low, high int64) int64
- func IntBetween(low, high int) int
- func Sample[T any](collections ...T) T
- func SampleWeighted[T any](collections ...W[T]) T
- func Samples[T any](collections []T, n int) []T
- func Shuffle[T any](collection []T)
- func ShuffleClone[T any](collection []T) []T
- func String(n int, set []rune) string
- type W
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LowerCaseLettersCharset = lo.LowerCaseLettersCharset UpperCaseLettersCharset = lo.UpperCaseLettersCharset LettersCharset = lo.LettersCharset NumbersCharset = lo.NumbersCharset AlphanumericCharset = lo.AlphanumericCharset LowerCaseAlphanumericCharset = append(LowerCaseLettersCharset, NumbersCharset...) UpperCaseAlphanumericCharset = append(UpperCaseLettersCharset, NumbersCharset...) SpecialCharset = lo.SpecialCharset AllCharset = lo.AllCharset )
Functions ¶
func Float64Between ¶
func Int64Between ¶
func IntBetween ¶
func SampleWeighted ¶
func ShuffleClone ¶
func ShuffleClone[T any](collection []T) []T
Types ¶
Click to show internal directories.
Click to hide internal directories.