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.

Example
fmt.Println(Descends("a", "a"))
fmt.Println(Descends("a", "a/b/c"))
fmt.Println(Descends("a/d", "a/b"))

Output:

true
true
false