https://github.com/hack-ink/unescaper
Unescape strings with escape sequences written out as literal characters.
https://github.com/hack-ink/unescaper
escape string unescape
Last synced: about 2 months ago
JSON representation
Unescape strings with escape sequences written out as literal characters.
- Host: GitHub
- URL: https://github.com/hack-ink/unescaper
- Owner: hack-ink
- License: gpl-3.0
- Created: 2022-07-29T08:11:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-10T09:41:49.000Z (5 months ago)
- Last Synced: 2025-12-14T03:47:45.297Z (4 months ago)
- Topics: escape, string, unescape
- Language: Rust
- Homepage: https://crates.io/crates/unescaper
- Size: 82 KB
- Stars: 26
- Watchers: 1
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-GPL3
Awesome Lists containing this project
README
# Unescaper
### Unescape strings with escape sequences written out as literal characters.
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://opensource.org/licenses/MIT)
[](https://github.com/hack-ink/unescaper/actions/workflows/checks.yml)
[](https://github.com/hack-ink/unescaper/tags)
[](https://github.com/hack-ink/unescaper)
[](https://github.com/hack-ink/unescaper)
## Usage
[More Examples](src/test.rs)
```rust
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](https://github.com/saghm/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.