Documentation ¶
Index ¶
- func Contains(vs []uint, v uint) bool
- func FromString(s string) (uint, error)
- func FromStringOrDefault(s string, defaultVal uint) uint
- func Max(v uint, vs ...uint) uint
- func Min(v uint, vs ...uint) uint
- func Pointer(v uint) *uint
- func Random() uint
- func RandomN(n uint) uint
- func Sort(vs []uint) []uint
- func UintOrDefault(v *uint, defaultVal uint) *uint
- func Unique(vs []uint) []uint
- type Set
- type UintSlice
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 FromStringOrDefault ¶ added in v0.1.0
FromStringOrDefault parses s and returns a uint.
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 uint. NOTE: this method is deprecated. Use helpy.Pointer instead.
func RandomN ¶
RandomN returns a non-negative pseudo-random number in [0,n) of type uint. It panics if n <= 0.
func UintOrDefault ¶
UintOrDefault returns uint 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[uint]
NOTE: this type is deprecated. Use helpy.Set instead
func MakeSet ¶
MakeSet returns a lookup map for uint NOTE: this function is deprecated. Use helpy.MakeSet instead.