nextSlash will find the index of the next unescaped slash in a string.
(s string)
| 88 | |
| 89 | // nextSlash will find the index of the next unescaped slash in a string. |
| 90 | func 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…