Advances the position until after the next newline character. If the line
is terminated by "\r\n", the '\n' must be consumed as whitespace by the
caller.
174990
private void skipToEndOfLine() throws IOException {
    while (pos < limit || fillBuffer(1)) {
      char c = buffer[pos++];
      if (c == '\n') {
        lineNumber++;
        lineStart = pos;
        break;
      } else if (c == '\r') {
        break;
      }
    }
  }
1329479
function nextLine() {
            if (stream) {
                curOffset++; // account for \n
                if (curOffset >= length) {
                    return false;
                }
            }
            lineStart = curOffset;
            var lineEnd = text.indexOf("\n", lineStart);
            if (lineEnd === -1) {
                lineEnd = length;
            }
            stream = new CodeMirror.StringStream(text.slice(curOffset, lineEnd));
            return true;
        }
160516
public void updateIteratorPosition(int length) {
        if(length > 0) {
            //make sure we dont go OB
            if((length + character) > parsedLine.line().length())
                length = parsedLine.line().length() - character;

            //move word counter to the correct word
            while(hasNextWord() &&
                    (length + character) >= parsedLine.words().get(word).lineIndex() +
                            parsedLine.words().get(word).word().length())
                word++;

            character = length + character;
        }
        else
            throw new IllegalArgumentException("The length given must be > 0 and not exceed the boundary of the line (including the current position)");
    }
505068
public boolean nextLine() {
	while (isValidIndex() && text[pos] != '\n' && text[pos] != '\r') {
	    next();
	}
	if (!isValidIndex()) return false;

	if (text[pos] == '\n') {
	    next();
	    return isValidIndex();
	}
	if (text[pos] == '\r') {
	    next();
	    if (isValidIndex() && text[pos] == '\n') {
		next();
	    }
	    return isValidIndex();
	}
	return false;
    }
282143
def join_next_line(self, separator=' '):
        
        if not self.document.on_last_line:
            self.cursor_position += self.document.get_end_of_line_position()
            self.delete()

            # Remove spaces.
            self.text = (self.document.text_before_cursor + separator +
                         self.document.text_after_cursor.lstrip(' '))
591762
private int countNonNewline(String str, int off, int len) {
    for(int cnt = 0; cnt < len; cnt++) {
      final int pos = off + cnt;
      if(str.charAt(pos) == UNIX_NEWLINE) {
        return cnt;
      }
      if(str.charAt(pos) == CARRIAGE_RETURN) {
        return cnt;
      }
    }
    return len;
  }
555678
private boolean isEndOfLine(int c) throws IOException {
        // check if we have \r\n...
        if (c == '\r') {
            if (in.lookAhead() == '\n') {
                // note: does not change c outside of this method !!
                c = in.read();
            }
        }
        return (c == '\n');
    }
86865
private void seekNonWs(String pattern, ParsePosition pos)
    {

        int len = 0;
        char[] buffer = pattern.toCharArray();

        do
        {
            len = Arrays.binarySearch(SPLIT_CHARS, buffer[pos.getIndex()]) >= 0 ? 1 : 0;
            pos.setIndex(pos.getIndex() + len);
        } while (len > 0 && pos.getIndex() < pattern.length());

    }
1335945
static int isNewLine(int[] chars)
  {
    checkArgument(chars.length > 1);
    // nl \n|\r\n|\r|\f
    if (chars[0] == '\r' && chars[1] == '\n')
    {
      return 2;
    }
    else if (chars[0] == '\n' || chars[0] == '\r' || chars[0] == '\f')
    {
      return 1;
    }
    return 0;
  }
387630
def go_to_new_line(self):
        """"""
        self.stdkey_end(False, False)
        self.insert_text(self.get_line_separator())
931255
private void skipToEndOfLine()
  {
    while (pos < limit) {
      char c = in.charAt(pos++);
      if (c == '\n') {
        lineNumber++;
        lineStart = pos;
        break;
      } else if (c == '\r') {
        break;
      }
    }
  }
870467
def _advance(self):
        
        cur_val = None if self.cur_token is None else self.cur_token.value
        try:
            self.cur_token = next(self._tokenizer)
        except StopIteration:
            self.cur_token = None
        return cur_val
806506
private void skipToEndOfLine() throws IOException {
        while (pos < limit || fillBuffer(1)) {
            char c = buffer[pos++];
            if (c == '\r' || c == '\n') {
                break;
            }
        }
    }
1284276
int next() throws
      IOException
  {
    prevChar = curChar;
    checkState(prevChar > -1);

    if (pos < buf.length)
    {
      curChar = buf[pos++];
    }
    else
    {
      curChar = in.read();
    }

    offset++;

    /*
       * Handle line and col
       * lf=\n, cr=\r
       */
    if (curChar == '\r' || curChar == '\n')
    {
      if (curChar == '\n' && prevChar == '\r')
      {
        //second char in a windows CR+LF
      }
      else
      {
        prevLine = line;
        line++;
      }

    }
    else if (prevLine < line)
    {
      col = 1;
      prevLine = line;
    }
    else
    {
      if (prevChar != 0)
      {
        col++;
      }
    }

    return curChar;
  }
1115248
public String next(int n) throws JSONException {
         if (n == 0) {
             return "";
         }

         char[] buffer = new char[n];
         int pos = 0;

         while (pos < n) {
             buffer[pos] = next();
             if (end()) {
                 throw syntaxError("Substring bounds error");                 
             }
             pos += 1;
         }
         return new String(buffer);
     }
956991
private int next() throws IOException, UnterminatedCommentException {
		int c = get();
		if (c == '/') {
			switch (peek()) {
			case '/':
				for (;;) {
					c = get();
					if (c <= '\n') {
						break;
					}
				}
				break;
			case '*':
				get();
				while (c != ' ') {
					switch (get()) {
					case '*':
						if (peek() == '/') {
							get();
							c = ' ';
						}
						break;
					case EOF:
						throw new UnterminatedCommentException(currentByteIndex, line, column);
					}
				}
				break;
			}
		}
		theY = theX;
		theX = c;
		return c;
	}
805363
function nextLine() {
            var at;
            line += 1;
            if (line >= lines.length) {
                return false;
            }
            character = 0;
            s = lines[line];
            at = s.search(cx);
            if (at >= 0) {
                warningAt("Unsafe character.", line, at);
            }
            return true;
        }