class FFI::Pointer

def write_string(str, len=nil)

Returns:
  • (self) -

Parameters:
  • len (Numeric) -- length of string to return
  • str (String) -- string to write
def write_string(str, len=nil)
  len = str.bytesize unless len
  # Write the string data without NUL termination
  put_bytes(0, str, 0, len)
end unless method_defined?(:write_string)