MCPcopy Create free account
hub / github.com/tendermint/tendermint / StringInSlice

Function StringInSlice

libs/strings/string.go:32–39  ·  view source on GitHub ↗

StringInSlice returns true if a is found the list.

(a string, list []string)

Source from the content-addressed store, hash-verified

30
31// StringInSlice returns true if a is found the list.
32func StringInSlice(a string, list []string) bool {
33 for _, b := range list {
34 if b == a {
35 return true
36 }
37 }
38 return false
39}
40
41// SplitAndTrim slices s into all subslices separated by sep and returns a
42// slice of the string s with all leading and trailing Unicode code points

Callers 1

TestStringInSliceFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestStringInSliceFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…