Skip to main content

Path_ContainsSegment

Function Path_ContainsSegment 

Source
fn Path_ContainsSegment(Path: &str, Needle: &str) -> bool
Expand description

Match a /seg1/seg2 substring as a complete path segment so target matches /target/... but not /get-target-info/.... Slashes are platform-agnostic - matches both / and \. A needle that itself contains a slash (".git/objects") is matched as a literal substring with leading-slash gating.