class FFI::StructLayout::CharArray

Enhancement to FFI::StructLayout::CharArray to add a get_str method that changes the string value of the character array by enforcing encoding of UTF-16LE (as used in NW RFC SDK) and strips off blanks at the end to return a readable String

Public Instance Methods

get_str() click to toggle source
# File lib/nwrfc/nwrfclib.rb, line 96
def get_str
  self.to_ptr.read_string(self.size).uC
end