Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/simplenote_ruby.rb

Instance Method Summary collapse

Instance Method Details

#unicode_escapeObject

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