doc-range ( from to document -- string )
Factor handbook » UI framework » Building user interfaces » Pre-made UI gadgets » Editor gadgets » Documents

Prev:doc-lines ( from to document -- slice )
Next:set-doc-range ( string from to document -- )


Vocabulary
documents

Inputs
froma pair of integers
toa pair of integers
documenta document


Outputs
stringa new string


Word description
Outputs all text in between two line/column number pairs. Lines are separated by \n.

Errors
Throws an error if from or to is out of bounds.

Definition


:: doc-range ( from to document -- string )
from to
[ [ from to ] dip document (doc-range) ] map-doc-lines
join-lines ;