https://github.com/tadd/string_undump
String#undump, inverse of String#dump
https://github.com/tadd/string_undump
ruby string undump unescape
Last synced: 11 months ago
JSON representation
String#undump, inverse of String#dump
- Host: GitHub
- URL: https://github.com/tadd/string_undump
- Owner: tadd
- License: other
- Created: 2017-04-12T16:35:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-13T16:28:30.000Z (over 8 years ago)
- Last Synced: 2024-04-25T08:21:25.789Z (about 2 years ago)
- Topics: ruby, string, undump, unescape
- Language: C
- Homepage: https://github.com/tadd/string_undump
- Size: 35.2 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# String#undump
Unofficial implementation of String#undump, does inverse of String#dump.
See [Feature #12275](https://bugs.ruby-lang.org/issues/12275) for details.
## Usage
```ruby
require 'string_undump'
puts '\u3059\u3054\u30FC\u3044'.undump #=> すごーい
puts '\xE3\x81\x9F\xE3\x81\xAE\xE3\x81\x97\xE3\x83\xBC'.undump #=> たのしー
puts '\u{1F43E}'.undump #=> 🐾
```
See [testcase](https://github.com/tadd/string_undump/blob/master/test/test_undump.rb) also.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'string_undump'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install string_undump
## Supported Ruby versions
2.0.0 or later.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/tadd/string_undump.
## License
Ruby's. See [COPYING](COPYING).