12 releases (4 breaking)

✓ Uses Rust 2018 edition

0.7.4 Aug 11, 2019
0.7.2 Mar 7, 2019
0.3.2 Dec 27, 2018
0.1.4 Nov 29, 2018

#6 in Hardware support

Download history 7233/week @ 2019-09-26 5817/week @ 2019-10-03 6358/week @ 2019-10-10 5472/week @ 2019-10-17 5739/week @ 2019-10-24 5892/week @ 2019-10-31 5180/week @ 2019-11-07 5186/week @ 2019-11-14 5941/week @ 2019-11-21 5973/week @ 2019-11-28 7207/week @ 2019-12-05 6434/week @ 2019-12-12 4450/week @ 2019-12-19 3771/week @ 2019-12-26 6028/week @ 2020-01-02

25,707 downloads per month
Used in 100 crates (3 directly)

MIT/Apache

59KB
1K SLoC

v_escape Documentation Latest version Build Status

The simd optimized escape code

Crate v_escape provides a macro new_escape! that define a struct with escaping functionalities. These macros are optimized using simd by default, but this can be altered using sub-attributes.

Documentation

Example

In order to use v_escape you will have to call one of the two macros to create an escape struct. In this example, when using the macro new_escape!(MyEscape, "62->bar"); a new a struct MyEscape will be created that every time its method MyEscape::fmt is called will replace all characters ">" with "bar".

#[macro_use]
extern crate v_escape;

new_escape!(MyEscape, "62->bar");

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

Dependencies

~1.5MB
~32K SLoC