StyledTextContent.getOffsetAtLine

Return the character offset of the first character of the given line. <p> <b>NOTE:</b> When there is no text (i.e., no lines), getOffsetAtLine(0) is a valid call that should return 0. </p>

@param lineIndex index of the line. The first line is at index 0. @return offset offset of the first character of the line. The first character of the document is at offset 0. The return value should include line delimiters. For example, if text = "\r\ntest\r\n" and delimiter = "\r\n", then: <ul> <li>getOffsetAtLine(0) is 0 <li>getOffsetAtLine(1) is 2 <li>getOffsetAtLine(2) is 8 </ul>

interface StyledTextContent
int
getOffsetAtLine
()

Meta