0.0
No release in over 3 years
Low commit activity in last 3 years
Easy String#undump
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
>= 10.0
 Project Readme

String#unescape

String#unescape is condition-relaxed String#undump.

Usage

require 'string_unescape'

puts '\u3059\u3054\u30FC\u3044'.unescape #=> すごーい
puts '\xE3\x81\x9F\xE3\x81\xAE\xE3\x81\x97\xE3\x83\xBC'.unescape #=> たのしー
puts '\u{1F43E}'.unescape #=> 🐾

Note that you don't need to wrap the string with ".

See testcase also.

Supported Ruby versions

2.5.x or later.

Installation

Add this line to your application's Gemfile:

gem 'string_unescape'

And then execute:

$ bundle

Or install it yourself as:

$ gem install string_unescape

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tadd/string_unescape .

License

Ruby's. See COPYING.