You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
255 B
13 lines
255 B
5 years ago
|
package denco
|
||
|
|
||
|
// NextSeparator returns an index of next separator in path.
|
||
|
func NextSeparator(path string, start int) int {
|
||
|
for start < len(path) {
|
||
|
if c := path[start]; c == '/' || c == TerminationCharacter {
|
||
|
break
|
||
|
}
|
||
|
start++
|
||
|
}
|
||
|
return start
|
||
|
}
|