#escaping #simd #optimized #macro

v_escape

The simd optimized escaping code

33 releases

0.18.0 Oct 12, 2021
0.16.1 Jun 2, 2021
0.16.0 Feb 23, 2021
0.15.0 Dec 21, 2020
0.1.4 Nov 29, 2018

#414 in Hardware support

Download history 3537/week @ 2023-12-11 3258/week @ 2023-12-18 2070/week @ 2023-12-25 2113/week @ 2024-01-01 3258/week @ 2024-01-08 3201/week @ 2024-01-15 3019/week @ 2024-01-22 2427/week @ 2024-01-29 2850/week @ 2024-02-05 3202/week @ 2024-02-12 3655/week @ 2024-02-19 4053/week @ 2024-02-26 4019/week @ 2024-03-04 3561/week @ 2024-03-11 3518/week @ 2024-03-18 3545/week @ 2024-03-25

14,930 downloads per month
Used in 120 crates (via v_shellescape)

MIT/Apache

85KB
2K SLoC

v_escape Documentation Latest version

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.

Documentation

Example

v_escape::new!(MyEscape; '<' -> "bar");

fn main() {
    let s = "foo<bar";
    
    print!("{}", MyEscape::from(s));
    assert_eq!(MyEscape::from(s).to_string(), "foobarbar");
}

Dependencies

~1.5MB
~33K SLoC