Class: FFI::StructLayout::CharArray
- Inherits:
-
Object
- Object
- FFI::StructLayout::CharArray
- Defined in:
- lib/nwrfc/nwrfclib.rb
Overview
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
Instance Method Summary collapse
Instance Method Details
#get_str ⇒ Object
96 97 98 |
# File 'lib/nwrfc/nwrfclib.rb', line 96 def get_str self.to_ptr.read_string(self.size).uC end |