Grab the entire rest of the input Rope, starting at an initial offset, or
return a default if we’re already at or beyond the end. Also see grabLine.
Extract a suffix of a certain length from the input:
Example1 expression>>> grabRest (delta ("Hello " :: ByteString)) (ropeBS "Hello World\nLorem") Nothing (\x y -> Just (x, Lazy.toString y))Just (Columns 6 6,"World\nLorem")Same deal, but over multiple strands:
Example1 expression>>> grabRest (delta ("Hel" :: ByteString)) (ropeBS "Hello" <> ropeBS "World") Nothing (\x y -> Just (x, Lazy.toString y))Just (Columns 3 3,"loWorld")When the offset is too long, fall back to a default:
Example1 expression>>> grabRest (delta ("OffetTooLong" :: ByteString)) (ropeBS "Hello") Nothing (\x y -> Just (x, Lazy.toString y))Nothing