Get the index of the start or end of the line — from index of any character on the same line.
auto rope = Rope("Hello, World!\nHello, Fluid!"); assert(rope.lineStartByIndex(5) == 0); assert(rope.lineEndByIndex(5) == 13); assert(rope.lineStartByIndex(18) == 14); assert(rope.lineEndByIndex(18) == rope.length);
See Implementation
Get the index of the start or end of the line — from index of any character on the same line.