MCPcopy Index your code
hub / github.com/DarthSim/overmind / SplitAndTrim

Function SplitAndTrim

utils/utils.go:45–54  ·  view source on GitHub ↗

SplitAndTrim splits string, trims every entry and removes blank entries

(str string)

Source from the content-addressed store, hash-verified

43
44// SplitAndTrim splits string, trims every entry and removes blank entries
45func SplitAndTrim(str string) (res []string) {
46 split := strings.Split(str, ",")
47 for _, s := range split {
48 s = strings.Trim(s, " ")
49 if len(s) > 0 {
50 res = append(res, s)
51 }
52 }
53 return
54}
55
56// StringsContain returns true if provided string slice contains provided string
57func StringsContain(strs []string, str string) bool {

Callers 1

newCommandFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…