v_escape
This crate provides a procedural macro for generating escape functions.
Example
#
use escape;
escape!
let s = "Hello,< world!\"";
let escaped = escape_fmt.to_string;
assert_eq!;
let mut escaped = Stringwith_capacity;
escape_string;
assert_eq!;
Features
fmt: Enables theescape_fmtfunction.string: Enables theescape_stringfunction.bytes: Enables theescape_bytesfunction.std: Enables thestdlibrary features.alloc: Enables thealloclibrary features.
Documentation
- Minimum supported Rust version: 1.85.0 or later
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.