You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a fundamental limitation of OsString and how it represents two different encodings on Unix and Windows. It is certainly possible to add many more APIs over time to perform various operations on an OsStr such as looking for prefixes, splitting, etc.
Or depending on the unix-only as_bytes() method on OsStrExt
There is also an encode_wide function on Windows for performing this sort of operation.
This issue, however, boils down to requesting more functionality be added to OsStr (new APIs), and belongs in the RFC repo instead of the rust-lang/rust repo. Would you be ok opening an issue over there instead?
This is essentially the operation provided by
starts_with()
on String, str, and slice.Right now, this can only be done by either:
as_bytes()
method on OsStrExtThe text was updated successfully, but these errors were encountered: