No way to portably find if OsStr has a particular prefix · Issue #22741 · rust-lang/rust (original) (raw)
This is essentially the operation provided by starts_with()
on String, str, and slice.
Right now, this can only be done by either:
- requiring the OsStr to be utf-8 (and converting it to str/String)
- Or depending on the unix-only
as_bytes()
method on OsStrExt