Crates.io | v_escape_derive |
lib.rs | v_escape_derive |
version | 0.9.1 |
source | src |
created_at | 2018-12-19 03:17:27.339663 |
updated_at | 2021-10-12 01:08:07.492186 |
description | Procedural macro package for v_escape |
homepage | |
repository | https://github.com/botika/v_escape |
max_upload_size | |
id | 102628 |
size | 39,367 |
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");
}