Crates.io | unescaper |
lib.rs | unescaper |
version | 0.1.5 |
source | src |
created_at | 2022-08-09 05:09:09.088656 |
updated_at | 2024-06-26 23:29:36.421048 |
description | Unescape strings with escape sequences written out as literal characters. |
homepage | https://hack.ink/unescaper |
repository | https://github.com/hack-ink/unescaper |
max_upload_size | |
id | 641562 |
size | 49,999 |
fn main() {
assert_eq!(unescaper::unescape(r"\u000a").unwrap(), "\n");
assert_eq!(unescaper::unescape(r"\u{a}").unwrap(), "\n");
assert_eq!(unescaper::unescape(r"\x0a").unwrap(), "\n");
assert_eq!(unescaper::unescape(r"\12").unwrap(), "\n");
}
The idea comes from unescape-rs.
The last commit of that repository was seven years ago.
So, I think it is no longer maintained.
That's why I created this repository, and I have made some improvements.