Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/simplenote_ruby.rb
Instance Method Summary collapse
-
#unicode_escape ⇒ Object
TODO: need to handle salogate pair.
Instance Method Details
#unicode_escape ⇒ Object
TODO: need to handle salogate pair
9 10 11 |
# File 'lib/simplenote_ruby.rb', line 9 def unicode_escape self.unpack('U*').map{ |i| i < 0x100 ? i.chr : '\u' + i.to_s(16).rjust(4, '0') }.join end |