11 releases
0.2.2 | May 25, 2020 |
---|---|
0.2.1 | Jan 22, 2020 |
0.1.9 | Jun 16, 2019 |
0.1.5 | May 14, 2019 |
0.1.4 | Apr 27, 2019 |
#4 in #osstring
49 downloads per month
Used in 6 crates
(5 directly)
31KB
547 lines
osstrtools
OsStrTools
adds some useful methods to OsStr
and OsString
that
are missing in the standard library, like
split()
,
replace()
,
or
splice()
. It
is mostly useful for dealing dealing with things like file names,
command line arguments, PathBuf
, and the like.
Windows support is experimental, but shoud hopefully mostly work,
although it is not well tested and likely somewhat slower due to some
overhead since it requires checking the strings for correctness. The
checking is done by
os_str_bytes
.
Right now Windows support is still gated behind a feature flag. To
enable it add this to your Cargo.toml
:
[dependencies]
osstrtools = { version = "0.2", features = ["windows"] }
lib.rs
:
OsStrTools
OsStrTools
adds some useful methods to OsStr
and OsString
that are missing in the standard library, like
split()
,
replace()
, or
splice()
. It is mostly
useful for dealing dealing with things like file names, command
line arguments, PathBuf
, and the like.
Windows support is experimental, but shoud hopefully mostly work,
although it is not well tested and likely somewhat slower due to
some overhead since it requires checking the strings for
correctness. The checking is done by
os_str_bytes
.
This crate is still maintained, but mostly has been deprecated in
favor of bstr
. If any bugs
remain it's likely they will be fixed as they come up, though.
Dependencies
~530KB
~10K SLoC