class String

Public Instance Methods

cU() click to toggle source

Convert string from UTF-8 to double-null terminated UTF-16LE string

# File lib/nwrfc/nwrfclib.rb, line 63
def cU
  (self.to_s + "\0").force_encoding('UTF-8').encode('UTF-16LE')
end
uC() click to toggle source

Convert string from UTF-16LE to UTF-8 and trim trailing whitespace

# File lib/nwrfc/nwrfclib.rb, line 68
def uC
  self.force_encoding('UTF-16LE').encode('UTF-8').strip
end