StringInSlice returns true if a is found the list.
(a string, list []string)
| 30 | |
| 31 | // StringInSlice returns true if a is found the list. |
| 32 | func 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 |
no outgoing calls
searching dependent graphs…