mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 11:29:12 +00:00
12 lines
217 B
Go
12 lines
217 B
Go
package common
|
|
|
|
// FindString returns true if needle is in haystack
|
|
func FindString(needle string, haystack []string) bool {
|
|
for _, str := range haystack {
|
|
if str == needle {
|
|
return true
|
|
}
|
|
}
|
|
|
|
return false
|
|
}
|