Hi. I was redirected here from https://github.com/rust-lang/rust/issues/new/choose since this is a feature request.
clap
is a popular command line argument parsing crate. Clap requires the ability to peek into an &OsStr
, for example, to see if the arg starts with -
or --
. It is desirable for Clap to operate on &OsStr
instead of &str
because native platforms do not limit command line arguments to &str
.
I believe parsing arguments from the command line to be a common use case, of which determining switches and flags is part of the task. Is adding an OsStr::starts_with
API something the libs team would be interested in?