unescaper

Crates.iounescaper
lib.rsunescaper
version0.1.5
sourcesrc
created_at2022-08-09 05:09:09.088656
updated_at2024-06-26 23:29:36.421048
descriptionUnescape strings with escape sequences written out as literal characters.
homepagehttps://hack.ink/unescaper
repositoryhttps://github.com/hack-ink/unescaper
max_upload_size
id641562
size49,999
Xavier Lau (AurevoirXavier)

documentation

README

Unescaper

Unescape strings with escape sequences written out as literal characters.

License GPLv3 License MIT Checks GitHub tag (latest by date) GitHub code lines GitHub last commit

Usage

More Examples

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.
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.

Commit count: 40

cargo fmt