arrayHelper

package module
v0.0.0-...-d99eec9 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 0 Imported by: 1

README

arrayHelper

small helper for work with arrays

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(vs []string, f func(string) bool) bool

All returns `true` if all of the strings in the slice satisfy the predicate `f`.

func Any

func Any(vs []string, f func(string) bool) bool

Any returns `true` if one of the strings in the slice satisfies the predicate `f`.

func Filter

func Filter(vs []string, f func(string) bool) []string

Filter returns a new slice containing all strings in the slice that satisfy the predicate `f`.

func Include

func Include(vs []string, t string) bool

Include returns `true` if the target string t is in the slice.

func Index

func Index(vs []string, t string) int

Index returns the first index of the target string `t`, or -1 if no match is found.

func Map

func Map(vs []string, f func(string) string) []string

Map returns a new slice containing the results of applying the function `f` to each string in the original slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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