struct Line
- Line
- Struct
- Value
- Object
Overview
Represents a logical line in a TextBuffer
.
Defined in:
aspis/line.crConstructors
Instance Method Summary
-
#==(other : self)
Two lines are equal if their buffers and bounds are equal.
-
#[](index : Int)
Returns the index-th character in this line.
-
#b : Int32
Returns the index where this line starts.
-
#content
Returns the content of this line.
-
#e : Int32
Returns the index where this line ends.
-
#each_char(&)
Yields each character in this line.
-
#empty?
Returns whether this line is empty.
-
#first_line?
Returns whether this line is the first line.
-
#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.
-
#includes?(index : Int)
Returns whether index is in this line's bounds.
-
#includes?(range : Range)
Returns whether range is completely included in the bounds of this line.
- #inspect(io)
-
#last_line?
Returns whether this line is the last line.
-
#ord : Int32
Returns the ordinal of this line.
-
#size
Returns the amount of characters in this line.
-
#slice(b : Int, e : Int)
Returns a slice of this line's content.
-
#upto(other : Line, &)
Yields lines starting from this line and up to other line, both included.
Constructor Detail
Instance Method Detail
Returns whether range is completely included in the bounds of this line.
Yields lines starting from this line and up to other line, both included.