There was an idea in this issue to implement starts_with
and ends_with
on OsStr
. I don't see it documented what promises that OsStr has. It seems like it can support any arbitrary byte sequence. One concern is that starts_with
won't know where one character ends and another begins. But if OsStr
can be constructed with arbitrary byte sequences, is it any more dangerous to allow it to be matched with another OsStr
(arbitrary byte sequence)?
I'm willing to implemented this if this idea is acceptable.