TruePath icon indicating copy to clipboard operation
TruePath copied to clipboard

Add `AbsolutePath.StartsWith`

Open ForNeVeR opened this issue 1 year ago • 2 comments

An API like AbsolutePath.StartsWith(AbsolutePath anotherPath) would be very useful.

ForNeVeR avatar Apr 28 '24 22:04 ForNeVeR

what is the mission of this function? could you describe so I can imagine where to start

Komroncube avatar May 05 '24 16:05 Komroncube

Its mission is to be a mirror of LocalPath::IsPrefixOf.

a.IsPrefixOf(b) should mean b.StartsWith(a), and it would be great to have it for both path types (i.e. implement as an extension method on Path<T>).

Motivation: in different contexts, the user may wish to express their logic via either method.

ForNeVeR avatar May 05 '24 18:05 ForNeVeR

Closed by #69.

ForNeVeR avatar Jun 20 '24 22:06 ForNeVeR