#escaping

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

#16 in #escaping

Download history 2887/week @ 2024-06-26 1347/week @ 2024-07-03 2854/week @ 2024-07-10 2906/week @ 2024-07-17 3330/week @ 2024-07-24 2847/week @ 2024-07-31 3165/week @ 2024-08-07 2492/week @ 2024-08-14 2484/week @ 2024-08-21 3022/week @ 2024-08-28 2576/week @ 2024-09-04 2566/week @ 2024-09-11 2699/week @ 2024-09-18 2978/week @ 2024-09-25 2228/week @ 2024-10-02 1288/week @ 2024-10-09

9,667 downloads per month
Used in 118 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
~35K SLoC