class ImGui::TextBuffer
- ImGui::TextBuffer
- IO
- Reference
- Object
Defined in:
imgui.crConstructors
- .new(string : String, capacity : Int32 = string.bytesize)
- .new(string : Bytes, capacity : Int32 = string.bytesize)
- .new(capacity : Int32 = 0)
Instance Method Summary
- #bytesize : Int32
- #capacity : Int32
- #clear : Nil
- #read(slice)
- #resize(size : Int32) : Nil
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #to_slice : Bytes
- #to_unsafe : Pointer(UInt8)
-
#write(slice : Bytes) : Nil
Writes the contents of slice into this
IO
.
Constructor Detail
Instance Method Detail
def to_s(io : IO)
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
def write(slice : Bytes) : Nil
#
Description copied from class IO
Writes the contents of slice into this IO
.
io = IO::Memory.new
slice = Bytes.new(4) { |i| ('a'.ord + i).to_u8 }
io.write(slice)
io.to_s # => "abcd"