textmatrix v0.1.0 Textmatrix.Buffer View Source
Textmatrix.Buffer encapsules the characters present in the matrix split up in lines an characters.
Link to this section Summary
Functions
ensure_capacity/2 resizes the buffer to the minimum requirted capacity. If the buffer is already of or above the required size, it will return the buffer as is.
new/0 returns a new empty buffer
to_string/1 takes the buffer and converts it into a multiline string.
write/4 takes the buffer, x and y location and a string to write at that location. It returns an updated buffer.
Link to this section Types
Link to this section Functions
ensure_capacity/2 resizes the buffer to the minimum requirted capacity. If the buffer is already of or above the required size, it will return the buffer as is.
new/0 returns a new empty buffer
to_string/1 takes the buffer and converts it into a multiline string.
write(buffer, x, y, string)
View Sourcewrite(t(), non_neg_integer(), non_neg_integer(), binary()) :: t()
write/4 takes the buffer, x and y location and a string to write at that location. It returns an updated buffer.