Documentation ¶
Index ¶
- func Abs(v int) int
- func Contains(vs []int, v int) bool
- func FromString(s string) (int, error)
- func FromStringOrDefault(s string, defaultVal int) int
- func IntOrDefault(v *int, defaultVal int) *int
- func Max(v int, vs ...int) int
- func Min(v int, vs ...int) int
- func Pointer(v int) *int
- func Random() int
- func RandomN(n int) int
- func Sort(vs []int) []int
- func Unique(vs []int) []int
- type IntSlice
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
Abs returns the absolute value of v. NOTE: this method is deprecated. Use helpy.Abs instead.
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 int.
func IntOrDefault ¶
IntOrDefault returns int if it is not nil, and a pointer to defaultVal otherwise. NOTE: this method is deprecated. Use helpy.DerefOrValue instead.
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 int. NOTE: this method is deprecated. Use helpy.Pointer instead.
Types ¶
type Set ¶
type Set helpy.Set[int]
NOTE: this type is deprecated. Use helpy.Set instead
func MakeSet ¶
MakeSet returns a lookup map for int NOTE: this function is deprecated. Use helpy.MakeSet instead.