Open
Description
Redirected from rust-lang/rust#22741
Using starts_with()
as an example:
Right now one can do this on OsStr by:
- requiring the OsStr to be utf-8 (and converting it to str/String)
- Or implimenting a unix version using
as_bytes()
, and a windows version usingencode_wide()
Unfortunately, the lack of a common method for iteration over elements of the OsStr means that any out-of-std implimentation of these will be un-happily platform specific.