Documentation ¶
Index ¶
- func Contains(vs []uint32, v uint32) bool
- func FromString(s string) (uint32, error)
- func FromStringOrDefault(s string, defaultVal uint32) uint32
- func Max(v uint32, vs ...uint32) uint32
- func Min(v uint32, vs ...uint32) uint32
- func Pointer(v uint32) *uint32
- func Random() uint32
- func RandomN(n uint32) uint32
- func Sort(vs []uint32) []uint32
- func Uint32OrDefault(v *uint32, defaultVal uint32) *uint32
- func Unique(vs []uint32) []uint32
- type Set
- type Uint32Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains returns true if vs contains v. NOTE: this function is deprecated. Use slicey.Contains instead.
func FromString ¶
FromString parses s and returns a uint32.
func FromStringOrDefault ¶ added in v0.1.0
FromStringOrDefault parses s and returns a uint32.
func Max ¶
Max returns the maximum value from v and vs. NOTE: this method is deprecated. Use helpy.Max instead.
func Min ¶
Min returns the minimum value from v and vs. NOTE: this method is deprecated. Use helpy.Min instead.
func Pointer ¶
Pointer returns a pointer to the given uint32. NOTE: this method is deprecated. Use helpy.Pointer instead.
func Random ¶
func Random() uint32
Random returns a non-negative pseudo-random number of type uint32
func RandomN ¶
RandomN returns a non-negative pseudo-random number in [0,n) of type uint32. It panics if n <= 0.
func Uint32OrDefault ¶
Uint32OrDefault returns uint32 if it is not nil, and a pointer to defaultVal otherwise. NOTE: this method is deprecated. Use helpy.DerefOrValue instead.
Types ¶
type Set ¶
type Set helpy.Set[uint32]
NOTE: this type is deprecated. Use helpy.Set instead
func MakeSet ¶
MakeSet returns a lookup map for uint32 NOTE: this function is deprecated. Use helpy.MakeSet instead.
type Uint32Slice ¶
type Uint32Slice []uint32
func (Uint32Slice) Len ¶
func (p Uint32Slice) Len() int
func (Uint32Slice) Less ¶
func (p Uint32Slice) Less(i, j int) bool
func (Uint32Slice) Swap ¶
func (p Uint32Slice) Swap(i, j int)