stringslice

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: MIT Imports: 2 Imported by: 38

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(values []string, filter func(string) bool) (ret []string)

Filter applies the provided filter function and removes all items from the slice for which the filter function returns true. This function uses append and might cause

func Has

func Has(haystack []string, needle string) bool

Has returns true if the needle is in the haystack (case-sensitive)

func HasI

func HasI(haystack []string, needle string) bool

HasI returns true if the needle is in the haystack (case-insensitive)

func Merge added in v0.1.0

func Merge(parts ...[]string) []string

func TrimEmptyFilter

func TrimEmptyFilter(values []string, trim func(rune) bool) (ret []string)

TrimEmptyFilter applies the strings.TrimFunc function and removes all empty strings

func TrimSpaceEmptyFilter

func TrimSpaceEmptyFilter(values []string) []string

TrimSpaceEmptyFilter applies the strings.TrimSpace function and removes all empty strings

func Unique added in v0.1.0

func Unique(i []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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