Documentation ¶
Index ¶
- type Any
- func (x *Any) Append(values ...any)
- func (x Any) At(index int) any
- func (x Any) Contains(value any) bool
- func (x Any) ContainsAll(values ...any) bool
- func (x Any) ContainsAny(values ...any) bool
- func (x Any) Equal(value []any) bool
- func (x Any) Find(fn func(any) bool) (any, bool)
- func (x Any) First() any
- func (x Any) FirstN(n int) Any
- func (x Any) GetAny(key string) any
- func (x Any) GetAnyOK(key string) (any, bool)
- func (x Any) GetBool(key string) bool
- func (x Any) GetBoolOK(key string) (bool, bool)
- func (x Any) GetFloat(key string) float64
- func (x Any) GetFloatOK(key string) (float64, bool)
- func (x Any) GetIndex(index int) (any, bool)
- func (x Any) GetInt(key string) int
- func (x Any) GetInt64(key string) int64
- func (x Any) GetInt64OK(key string) (int64, bool)
- func (x Any) GetIntOK(key string) (int, bool)
- func (x *Any) GetPointer(key string) (any, bool)
- func (x Any) GetString(key string) string
- func (x Any) GetStringOK(key string) (string, bool)
- func (x Any) IsEmpty() bool
- func (x Any) IsLength(length int) bool
- func (x Any) Keys() []string
- func (x Any) Last() any
- func (x Any) Length() int
- func (x Any) NotEmpty() bool
- func (x *Any) Remove(key string) bool
- func (x Any) Reverse() Any
- func (x *Any) SetAny(key string, value any) bool
- func (x *Any) SetBool(key string, value bool) bool
- func (x *Any) SetFloat(key string, value float64) bool
- func (s *Any) SetIndex(index int, value any) bool
- func (x *Any) SetInt(key string, value int) bool
- func (x *Any) SetInt64(key string, value int64) bool
- func (x *Any) SetString(key string, value string) bool
- func (x *Any) SetValue(value any) error
- func (x Any) Shuffle() Any
- type Object
- func (x *Object[T]) Append(values ...T)
- func (x Object[T]) At(index int) T
- func (x Object[T]) AtOK(index int) (T, bool)
- func (x Object[T]) Find(fn func(T) bool) (T, bool)
- func (x Object[T]) First() T
- func (x Object[T]) FirstN(n int) Object[T]
- func (x Object[T]) GetAny(key string) any
- func (x Object[T]) GetAnyOK(key string) (any, bool)
- func (x *Object[T]) GetPointer(name string) (any, bool)
- func (x Object[T]) IsEmpty() bool
- func (x Object[T]) IsLength(length int) bool
- func (x Object[T]) Keys() []string
- func (x Object[T]) Last() T
- func (x Object[T]) Length() int
- func (x Object[T]) NotEmpty() bool
- func (x *Object[T]) Remove(key string) bool
- func (x Object[T]) Reverse() Object[T]
- func (s *Object[T]) SetIndex(index int, value any) bool
- func (s *Object[T]) SetValue(value any) error
- func (x Object[T]) Shuffle() Object[T]
- type String
- func (x *String) Append(values ...string)
- func (x String) At(index int) string
- func (x String) Contains(value string) bool
- func (x String) ContainsAll(values ...string) bool
- func (x String) ContainsAny(values ...string) bool
- func (x String) Equal(value []string) bool
- func (x String) Find(fn func(string) bool) (string, bool)
- func (x String) First() string
- func (x String) FirstN(n int) String
- func (x String) GetAny(key string) any
- func (x String) GetAnyOK(key string) (any, bool)
- func (x String) GetString(key string) string
- func (x String) GetStringOK(key string) (string, bool)
- func (x String) IsEmpty() bool
- func (x String) IsLength(length int) bool
- func (x String) Join(delimiter string) string
- func (x String) Keys() []string
- func (x String) Last() string
- func (x String) Length() int
- func (x String) NotEmpty() bool
- func (s *String) Remove(key string) bool
- func (x String) Reverse() String
- func (s *String) SetIndex(index int, value any) bool
- func (s *String) SetString(key string, value string) bool
- func (s *String) SetValue(value any) error
- func (x String) Shuffle() String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Any ¶
type Any []any
func (Any) At ¶ added in v0.21.5
At returns a bound-safe element from the slice. If the index is out of bounds, then `At` returns the zero value for the slice type
func (Any) Contains ¶ added in v0.21.4
Contains returns TRUE if the slice contains the specified value
func (Any) ContainsAll ¶ added in v0.21.4
ContainsAll returns TRUE if the slice contains all of the specified values
func (Any) ContainsAny ¶ added in v0.21.4
ContainsAny returns TRUE if the slice contains any of the specified values
func (Any) Equal ¶ added in v0.21.4
Equal returns TRUE if the slice contains exactly the same elements as the specified value
func (Any) Find ¶ added in v0.23.0
Find returns the first element in the slice that satisfies the provided function.
func (Any) First ¶ added in v0.10.0
First returns the first element in the slice, or nil if the slice is empty
func (Any) FirstN ¶ added in v0.21.4
FirstN returns the first "n" elements in the slice, or all elements if "n" is greater than the length of the slice
func (Any) IsLength ¶ added in v0.10.0
IsLength returns TRUE if the slice contains exactly "length" elements
func (Any) Keys ¶ added in v0.22.0
Keys returns a slice of strings representing the indexes of this slice
func (Any) Last ¶ added in v0.10.0
Last returns the last element in the slice, or nil if the slice is empty
func (Any) NotEmpty ¶ added in v0.16.3
NotEmpty returns TRUE if the slice contains at least one element
type Object ¶ added in v0.10.0
type Object[T any] []T
func (*Object[T]) Append ¶ added in v0.12.0
func (x *Object[T]) Append(values ...T)
Append adds one or more elements to the end of the slice
func (Object[T]) At ¶ added in v0.21.5
At returns a bound-safe element from the slice. If the index is out of bounds, then `At` returns the zero value for the slice type
func (Object[T]) Find ¶ added in v0.23.0
Find returns the first element in the slice that satisfies the provided function.
func (Object[T]) First ¶ added in v0.10.0
func (x Object[T]) First() T
First returns the first element in the slice, or nil if the slice is empty
func (Object[T]) FirstN ¶ added in v0.21.4
FirstN returns the first "n" elements in the slice, or all elements if "n" is greater than the length of the slice
func (*Object[T]) GetPointer ¶ added in v0.14.0
func (Object[T]) IsLength ¶ added in v0.10.0
IsLength returns TRUE if the slice contains exactly "length" elements
func (Object[T]) Keys ¶ added in v0.22.0
Keys returns a slice of strings representing the indexes of this slice
func (Object[T]) Last ¶ added in v0.10.0
func (x Object[T]) Last() T
Last returns the last element in the slice, or nil if the slice is empty
func (Object[T]) NotEmpty ¶ added in v0.16.3
NotEmpty returns TRUE if the slice contains at least one element
func (Object[T]) Reverse ¶ added in v0.10.0
Reverse returns a new slice with the elements in reverse order
type String ¶
type String []string
func (String) At ¶ added in v0.21.5
At returns a bound-safe element from the slice. If the index is out of bounds, then `At` returns the zero value for the slice type
func (String) Contains ¶ added in v0.11.2
Contains returns TRUE if the slice contains the specified value
func (String) ContainsAll ¶ added in v0.14.0
ContainsAll returns TRUE if the slice contains all of the specified values
func (String) ContainsAny ¶ added in v0.14.0
ContainsAny returns TRUE if the slice contains any of the specified values
func (String) Equal ¶ added in v0.11.2
Equal returns TRUE if the slice contains exactly the same elements as the "value" slice
func (String) Find ¶ added in v0.23.0
Find returns the first element in the slice that satisfies the provided function.
func (String) First ¶ added in v0.10.0
First returns the first element in the slice, or nil if the slice is empty
func (String) FirstN ¶ added in v0.21.5
FirstN returns the first "n" elements in the slice, or all elements if "n" is greater than the length of the slice
func (String) IsLength ¶ added in v0.10.0
IsLength returns TRUE if the slice contains exactly "length" elements
func (String) Join ¶ added in v0.19.1
Join concatenates all elements of the slice into a single string, separated by the specified delimiter
func (String) Keys ¶ added in v0.22.0
Keys returns a slice of strings representing the indexes of this slice
func (String) Last ¶ added in v0.10.0
Last returns the last element in the slice, or nil if the slice is empty
func (String) NotEmpty ¶ added in v0.16.3
NotEmpty returns TRUE if the slice contains at least one element