Unescaper
Unescape strings with escape sequences written out as literal characters.
Install / Use
/learn @hack-ink/UnescaperREADME
<div align="center">
Unescaper
Unescape strings with escape sequences written out as literal characters.
</div>Usage
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");
}
Thanks
The idea comes from unescape-rs.<br> The last commit of that repository was seven years ago.<br> So, I think it is no longer maintained.<br> That's why I created this repository, and I have made some improvements.
