int getLineLength(int lineIndex)

Source

int getLineLength(int lineIndex) {
  return getLineText(lineIndex).length;
}