private static int getNextLineStart(int start, CharSequence text) {
    int end = start;
    while (text.charAt(end) != '\n') {
      end++;
    }
    end++;
    return end;
  }
private static int getNextLineStart(int start, CharSequence text)