path_contains(parent: utf8, child: utf8) → bool
Category: [paths](builtinspaths)_
Segment-aware path prefix test: whether child is parent itself or lives under it. Splits on /, so src/ does not contain src2/x. A path contains itself.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| parent | utf8 | The containing path (trailing slash optional). | — |
| child | utf8 | The path to test. | — |
| returns | bool | true if child equals parent or is nested beneath it. | — |
wcl
path_contains("src/", "src/core/mod.rs") // nested under src/, segment-aware → true