struct

Line

Inherits Struct < Value < Object

Represents a logical line in a TextBuffer.

Constructors

new(buf : TextBuffer, ord : Int32, b : Int32, e : Int32)
Source

Instance methods

==(other : self)

Two lines are equal if their buffers and bounds are equal.

[](index : Int)

Returns the index-th character in this line.

Source
b

Returns the index where this line starts.

Source
content

Returns the content of this line.

Source
e

Returns the index where this line ends.

Source
each_char

Yields each character in this line.

Source
empty?

Returns whether this line is empty.

Source
first_line?

Returns whether this line is the first line.

Source
hash(hasher)

Two lines are equal if their buffers and bounds are equal.

in_buffer?(other : TextBuffer)

Returns whether this line is in the other buffer.

Source
includes?(index : Int)

Returns whether index is in this line's bounds.

Source
includes?(range : Range)

Returns whether range is completely included in the bounds of this line.

Source
inspect(io)
Source
last_line?

Returns whether this line is the last line.

Source
ord

Returns the ordinal of this line.

Source
size

Returns the amount of characters in this line.

Source
slice(b : Int, e : Int)

Returns a slice of this line's content.

Source
upto(other : Line, &)

Yields lines starting from this line and up to other line, both included.

Source