stringslice

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(col []string, item string) bool

Contains returns true if the given string is present at least once in the slice

func FindIndex

func FindIndex(col []string, item string) int

FindIndex returns the index of a particular string Returns -1 if the string is not present in the slice

func RemoveFirst

func RemoveFirst(col []string, item string) []string

RemoveFirst returns a slice with the string removed If the string is present multiple times, only the first will be removed If the string is not present in the slice the original slice is returned Mutates the slice in place, does not copy

Types

This section is empty.

Jump to

Keyboard shortcuts

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