Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
ContainsString checks if a given slice of strings contains the provided string. If a modifier func is provided, it is called with the slice item before the comparation.
haystack := []string{"one", "Two", "Three"} if slice.ContainsString(haystack, "two", strings.ToLower) { // Do thing }
func ContainsStringEqualFold ¶ added in v3.11.0
ContainsStringEqualFold checks if a given slice of strings contains the provided string as ignore the cases.
haystack := []string{"aa", "bb", "Cc"} if slice.ContainsStringEqualFold(haystack, "cC") { // Do thing }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.