Expand description
§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.
Structs§
- String
Splicer - Temporary storage for the string to be spliced. Can assemble the
final
OsString
in different ways, depending on the use-case. Created bysplice()
.
Traits§
- Bytes
- Conversion Trait implemented for many byte sources that can be used as arguments for search patterns and replacement strings. The methods probably shouldn’t be called anywhere outside this crate.
- OsStr
Concat - Concatenation of things that can be turned into an
Iterator
of elements that implementBytes
. - OsStr
Tools - Extension Trait for OsStr to make working OsStr them more
ergonomic. It contains many methods that work similarly to those
of
String
. - OsString
Tools - Includes some of the methods of
OsStrTools
but they take theOsString
by value and return it without modification if the specific search pattern isn’t found.