23 releases (9 breaking)

0.12.1 Jul 29, 2020
0.11.3 Jun 30, 2020
0.7.4 Aug 11, 2019
0.7.2 Mar 7, 2019
0.1.4 Nov 29, 2018

#7 in Hardware support

Download history 6297/week @ 2020-06-01 6671/week @ 2020-06-08 7283/week @ 2020-06-15 6636/week @ 2020-06-22 7725/week @ 2020-06-29 6493/week @ 2020-07-06 6561/week @ 2020-07-13 6891/week @ 2020-07-20 6274/week @ 2020-07-27 5638/week @ 2020-08-03 6585/week @ 2020-08-10 6645/week @ 2020-08-17 6475/week @ 2020-08-24 5982/week @ 2020-08-31 8935/week @ 2020-09-07 8755/week @ 2020-09-14

27,965 downloads per month
Used in 111 crates (4 directly)

MIT/Apache

87KB
2K 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–1.5MB
~35K SLoC