package pathx
import "go.abhg.dev/doc2go/internal/pathx"
Package pathx provides extensions to the path package.
Index
Examples
Functions
func Descends
func Descends(a, b string) bool
Descends reports whether b is equal to, or a descendant of a.
Output:
Example
fmt.Println(Descends("a", "a"))
fmt.Println(Descends("a", "a/b/c"))
fmt.Println(Descends("a/d", "a/b"))
true
true
false