MCPcopy Create free account
hub / github.com/campoy/embedmd / nextSlash

Function nextSlash

embedmd/command.go:90–101  ·  view source on GitHub ↗

nextSlash will find the index of the next unescaped slash in a string.

(s string)

Source from the content-addressed store, hash-verified

88
89// nextSlash will find the index of the next unescaped slash in a string.
90func nextSlash(s string) int {
91 for sep := 0; ; sep++ {
92 i := strings.IndexByte(s[sep:], '/')
93 if i < 0 {
94 return -1
95 }
96 sep += i
97 if sep == 0 || s[sep-1] != '\\' {
98 return sep
99 }
100 }
101}

Callers 1

fieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…