Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Fiddle::Pointer#to_s

to_s(p1 = v1)
Example
ptr.to_s        => string
ptr.to_s(len)   => string

Returns the pointer contents as a string.

When called with no arguments, this method will return the contents until the first NULL byte.

When called with len, a string of len bytes will be returned.

See to_str

See also #to_int #to_str #to_i #to_value also in 3.4 · 3.2 · 3.1 · 3.0