MCPcopy Create free account
hub / github.com/pydio/cells / StringToKeys

Function StringToKeys

common/utils/std/strings.go:52–76  ·  view source on GitHub ↗
(s ...string)

Source from the content-addressed store, hash-verified

50}
51
52func StringToKeys(s ...string) []string {
53 var r []string
54
55 for _, v := range s {
56 if v == "" {
57 continue
58 }
59 v = strings.Replace(v, "[", "/", -1)
60 v = strings.Replace(v, "]", "/", -1)
61 v = strings.Replace(v, "//", "/", -1)
62 v = strings.Trim(v, "/")
63 r = append(r, strings.Split(v, "/")...)
64 }
65
66 lastIndex := 0
67 for i, v := range r {
68 if v == "#" {
69 lastIndex = i + 1
70 }
71 }
72
73 r = r[lastIndex:]
74
75 return r
76}

Callers 15

ValMethod · 0.92
ValMethod · 0.92
TestDefaultFunction · 0.92
ValMethod · 0.92
newReceiverFunction · 0.92
ValMethod · 0.92
ValMethod · 0.92
SetMethod · 0.92
DelMethod · 0.92
ValMethod · 0.92
DefaultMethod · 0.92
BoolMethod · 0.92

Calls 1

ReplaceMethod · 0.45

Tested by 1

TestDefaultFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…