class FFI::Pointer
def write_string(str, len=nil)
-
(self)
-
Parameters:
-
len
(Integer
) -- 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)