Expand description
This crate provides the StrTools trait which exposes a variety of helper functions for handling strings for use cases like handling user input.
Examples
// split a string by some separator but ignore escaped ones
let parts: Vec<_> = r"this string\ is split by\ spaces unless they are\ escaped"
.split_non_escaped('\\', &[' '])?
.collect();
assert_eq!(
parts,
[
"this",
"string is",
"split",
"by spaces",
"unless",
"they",
"are escaped"
]
);Modules
Contains functions and types related to escaping strings.