sliceutil

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 1 Imported by: 80

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanWhitespace

func CleanWhitespace(list []string, omitEmpty bool) (items []string)

CleanWhitespace removes leading and trailing white space from each element of the input slice. Elements that end up as empty strings are excluded from the result depending on the value of the omitEmpty flag.

func IndexOfStringInSlice

func IndexOfStringInSlice(searchFor string, searchIn []string) int

IndexOfStringInSlice ...

func IsStringInSlice

func IsStringInSlice(searchFor string, searchIn []string) bool

IsStringInSlice ...

func UniqueStringSlice

func UniqueStringSlice(strs []string) []string

UniqueStringSlice - returns a cleaned up list, where every item is unique. Does NOT guarantee any ordering, the result can be in any order!

Types

This section is empty.

Jump to

Keyboard shortcuts

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