Crates.io | v_escape |
lib.rs | v_escape |
version | 0.18.0 |
source | src |
created_at | 2018-11-23 22:14:48.482695 |
updated_at | 2021-10-12 00:41:50.766312 |
description | The simd optimized escaping code |
homepage | |
repository | https://github.com/botika/v_escape |
max_upload_size | |
id | 98348 |
size | 111,006 |
The simd optimized escape code
Crate v_escape provides a macro new_escape!
that define a escaping functionalities.
These macros are optimized using simd by default, but this can be altered using sub-attributes.
v_escape::new!(MyEscape; '<' -> "bar");
fn main() {
let s = "foo<bar";
print!("{}", MyEscape::from(s));
assert_eq!(MyEscape::from(s).to_string(), "foobarbar");
}