class ImGui::TextBuffer

Defined in:

imgui.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(string : String, capacity : Int32 = string.bytesize) #

[View source]
def self.new(string : Bytes, capacity : Int32 = string.bytesize) #

[View source]
def self.new(capacity : Int32 = 0) #

[View source]

Instance Method Detail

def bytesize : Int32 #

[View source]
def capacity : Int32 #

[View source]
def clear : Nil #

[View source]
def read(slice) #

[View source]
def resize(size : Int32) : Nil #

[View source]
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>

[View source]
def to_slice : Bytes #

[View source]
def to_unsafe : Pointer(UInt8) #

[View source]
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"

[View source]