arrutil

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 4 Imported by: 60

Documentation

Overview

Package arrutil provides some util functions for array, slice

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v0.3.6

func Contains(arr, val interface{}) bool

Contains array(strings, ints, uints) should be contains the given value(int(X),string).

func Int64sHas added in v0.3.6

func Int64sHas(ints []int64, val int64) bool

Int64sHas check the []int64 contains the given value

func IntsHas added in v0.3.6

func IntsHas(ints []int, val int) bool

IntsHas check the []int contains the given value

func NotContains added in v0.3.6

func NotContains(arr, val interface{}) bool

NotContains array(strings, ints, uints) should be not contains the given value.

func Reverse

func Reverse(ss []string)

Reverse string slice [site user info 0] -> [0 info user site]

func StringsHas added in v0.3.6

func StringsHas(ss []string, val string) bool

StringsHas check the []string contains the given element

func StringsRemove added in v0.1.4

func StringsRemove(ss []string, s string) []string

StringsRemove an value form an string slice

func StringsToInts added in v0.2.2

func StringsToInts(ss []string) (ints []int, err error)

StringsToInts string slice to int slice

func TrimStrings added in v0.2.2

func TrimStrings(ss []string, cutSet ...string) (ns []string)

TrimStrings trim string slice item.

Types

This section is empty.

Jump to

Keyboard shortcuts

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