MRLineStorage
MRLineStorage is a special object accessible from the TextActionContext that allows you to work with the lines in the context document.
Read-only properties
- numberOfLines: the total number of lines in this context
Methods
lineStartIndexLessThanIndex(characterIndex)
Returns the character index for the beginning of the line that is less than the given characterIndex, or -1
.
lineStartIndexGreaterThanIndex(characterIndex)
Returns the character index for the beginning of the line that is greater than the given characterIndex, or -1
.
lineNumberForIndex(characterIndex)
Returns the line number for the line that contains the given characterIndex.
lineRangeForIndex(characterIndex)
Returns the Range for the line that contains the given characterIndex.
lineRangeForLineNumber(lineNumber)
Returns the Range for line number lineNumber.
lineRangeForRange(range)
Returns the Range for the line(s) that completely encompass the Range range.