str

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, s string) bool

Contains checks if given string exists in the slice

func ContainsIgnorecase

func ContainsIgnorecase(slice []string, s string) bool

ContainsIgnorecase checks if given string exists in the slice. Case insensitive.

func FindIndex

func FindIndex(slice []string, s string) (int, bool)

FindIndex returns the first occurrence index of given string. Returns -1 if string was not found.

func Insert added in v0.2.3

func Insert(slice []string, idx int, val string) []string

Insert inserts given value to given index into a slice

func Remove added in v0.2.3

func Remove(slice []string, s string) []string

Remove removes given string from a slice

func RemoveFrom added in v0.2.3

func RemoveFrom(slice []string, s int) []string

RemoveFrom removes a string from given index

func ToSnakeCase added in v0.2.3

func ToSnakeCase(str string) string

func Unique

func Unique(t []string) []string

Unique returns unique strings from given slice of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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