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 : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


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