[][src]Crate osstrtools

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

StringSplicer

Temporary storage for the string to be spliced. Can assemble the final OsString in different ways, depending on the use-case. Created by splice().

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.

OsStrConcat

Concatenation of things that can be turned into an Iterator of elements that implement Bytes.

OsStrTools

Extension Trait for OsStr to make working OsStr them more ergonomic. It contains many methods that work similarly to those of String.

OsStringTools

Includes some of the methods of OsStrTools but they take the OsString by value and return it without modification if the specific search pattern isn't found.