22 releases (9 breaking)

✓ Uses Rust 2018 edition

0.12.0 Jul 2, 2020
0.10.0 Jun 17, 2020
0.7.4 Aug 11, 2019
0.7.2 Mar 7, 2019
0.1.4 Nov 29, 2018

#6 in Hardware support

Download history 5269/week @ 2020-03-16 4902/week @ 2020-03-23 4695/week @ 2020-03-30 5043/week @ 2020-04-06 4778/week @ 2020-04-13 5489/week @ 2020-04-20 6098/week @ 2020-04-27 5614/week @ 2020-05-04 6847/week @ 2020-05-11 6387/week @ 2020-05-18 5208/week @ 2020-05-25 6297/week @ 2020-06-01 6671/week @ 2020-06-08 7283/week @ 2020-06-15 6636/week @ 2020-06-22 7406/week @ 2020-06-29

25,845 downloads per month
Used in 113 crates (4 directly)

MIT/Apache

86KB
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
~33K SLoC