#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

#458 in Hardware support

Download history 3189/week @ 2024-01-07 3367/week @ 2024-01-14 3089/week @ 2024-01-21 2447/week @ 2024-01-28 2460/week @ 2024-02-04 3242/week @ 2024-02-11 3932/week @ 2024-02-18 3902/week @ 2024-02-25 3903/week @ 2024-03-03 3527/week @ 2024-03-10 3622/week @ 2024-03-17 3366/week @ 2024-03-24 3873/week @ 2024-03-31 2952/week @ 2024-04-07 3427/week @ 2024-04-14 2899/week @ 2024-04-21

13,523 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
~34K SLoC