array

package
v0.9.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Implode added in v0.9.14

func Implode(items interface{}, separator string) string

Implode concat items by the given separator

Types

type Array added in v0.8.0

type Array interface {
	Implode(separator string) string
	Length() int
}

Array interface

type IntSlice added in v0.8.0

type IntSlice struct {
	// contains filtered or unexported fields
}

IntSlice

func Int added in v0.8.0

func Int(items []int) *IntSlice

Int return IntSlice

func (IntSlice) Has added in v0.9.10

func (s IntSlice) Has(elem int) bool

Has

func (IntSlice) Implode added in v0.8.0

func (s IntSlice) Implode(separator string) string

Implode

func (IntSlice) Items added in v0.9.10

func (s IntSlice) Items() []int

Items

func (IntSlice) Length added in v0.8.0

func (s IntSlice) Length() int

Length return len of slice

func (IntSlice) Max added in v0.9.14

func (s IntSlice) Max() int

Max return max number

func (IntSlice) Min added in v0.9.14

func (s IntSlice) Min() int

Min return min number

func (*IntSlice) Push added in v0.8.0

func (s *IntSlice) Push(items ...int)

Push

func (IntSlice) Sum added in v0.9.10

func (s IntSlice) Sum() int

Sum

func (IntSlice) ToString added in v0.8.0

func (s IntSlice) ToString() []string

ToString return string slice

func (IntSlice) Unique added in v0.8.0

func (s IntSlice) Unique() []int

Unique return unique elem slice

type StringSlice added in v0.8.0

type StringSlice struct {
	// contains filtered or unexported fields
}

StringSlice

func Explode added in v0.9.14

func Explode(str, separator string) StringSlice

Explode split string with separator

func String added in v0.8.0

func String(items []string) StringSlice

Int return IntSlice

func (StringSlice) Has added in v0.9.10

func (s StringSlice) Has(elem string) bool

Has

func (StringSlice) Implode added in v0.8.0

func (s StringSlice) Implode(separator string) string

Implode

func (StringSlice) Items added in v0.9.10

func (s StringSlice) Items() []string

Items

func (StringSlice) Length added in v0.8.0

func (s StringSlice) Length() int

Length

func (*StringSlice) Push added in v0.8.0

func (s *StringSlice) Push(items ...string)

Push

func (StringSlice) ToInt added in v0.8.0

func (s StringSlice) ToInt() []int

ToString return string slice

func (StringSlice) Unique added in v0.8.0

func (s StringSlice) Unique() []string

Unique return unique elem slice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL