Advance past any white space. Leave the reader positioned before the next
tag (or non-white-space event).
976195
protected void advancePastWhitespace(XMLEventReader reader)
            throws XMLStreamException {
        XMLEvent next = reader.peek();
        while (next.isCharacters() && next.asCharacters().isWhiteSpace()) {
            reader.nextEvent();
            next = reader.peek();
        }
    }
43924
function trimTrailingWhitespace(index, nextTag) {
    for (var endTag = null; index >= 0 && _canTrimWhitespace(endTag); index--) {
      var str = buffer[index];
      var match = str.match(/^<\/([\w:-]+)>$/);
      if (match) {
        endTag = match[1];
      }
      else if (/>$/.test(str) || (buffer[index] = collapseWhitespaceSmart(str, null, nextTag, options))) {
        break;
      }
    }
  }
846841
private void advance() {
	String s = null;
	while (tokenizer.hasNext()) {
	    String nextToken = tokenizer.next();
	    // stop if the word should be returned
	    if (filter.accept(nextToken)) {
		s = nextToken;
		break;
	    }
	}
	next = s;
    }
243804
private void modifyEnsure(int ahead) {
        if (isShared()) {
            int len = (end - p) + ahead;
            byte[]tmp = new byte[len + NODE_STR_MARGIN];
            System.arraycopy(bytes, p, tmp, 0, end - p);
            bytes = tmp;
            end = end - p;
            p = 0;
            clearShared();
        } else {
            ensure(ahead);
        }
    }
287971
protected function skipWhitespace(): void
    {
        while ($this->position < $this->bodyLength) {
            $code = $this->readCharCode($this->position);

            if (9 === $code || 32 === $code || 44 === $code || 0xfeff === $code) {
                // tab | space | comma | BOM
                ++$this->position;
            } elseif (10 === $code) {
                // new line (\n)
                ++$this->position;
                ++$this->line;
                $this->lineStart = $this->position;
            } elseif (13 === $code) {
                // carriage return (\r)
                if (10 === $this->readCharCode($this->position + 1)) {
                    // carriage return and new line (\r\n)
                    $this->position += 2;
                } else {
                    ++$this->position;
                }
                ++$this->line;
                $this->lineStart = $this->position;
            } else {
                break;
            }
        }
    }
1156847
public void skipWhitespace()
	{
		while(hasMore())
		{
			char c=read();
			if(c=='#')
			{
				readUntil('\n');
				return;
			}
			if(!Character.isWhitespace(c))
			{
				rewind(1);
				return;
			}
		}
	}
755229
def clean_whitespace(self, tree):
        

        pointer = 0
        end = len(tree)

        while pointer < end:
            piece = tree[pointer]
            if piece[0] == 'block':
                child_tree = piece[3]

                # Look at open tag, if the only other thing on the line is whitespace
                # then delete it so we don't introduce extra newlines to the output
                open_pre_whitespace = False
                open_pre_content = True
                if pointer > 1 and tree[pointer - 1][0] == 'whitespace' and (tree[pointer - 2][0] == 'newline' or tree[pointer - 2] == 'template'):
                    open_pre_whitespace = True
                    open_pre_content = False
                elif pointer > 0 and (tree[pointer - 1][0] == 'newline' or tree[pointer - 1] == 'template'):
                    open_pre_content = False

                open_post_whitespace = False
                open_post_content = True
                child_len = len(child_tree)
                if child_len > 2 and child_tree[1][0] == 'whitespace' and child_tree[2][0] == 'newline':
                    open_post_whitespace = True
                    open_post_content = False
                elif child_len > 1 and child_tree[1][0] == 'newline':
                    open_post_content = False

                if not open_pre_content and not open_post_content:
                    if open_pre_whitespace:
                        tree.pop(pointer - 1)
                        pointer -= 1
                        end -= 1
                    if open_post_whitespace:
                        child_tree.pop(1)
                    child_tree.pop(1)  # trailing newline

                # Do the same thing, but for the close tag
                close_pre_whitespace = False
                close_pre_content = True
                child_len = len(child_tree)
                if child_len > 2 and child_tree[child_len - 1][0] == 'whitespace' and child_tree[child_len - 2][0] == 'newline':
                    close_pre_whitespace = True
                    close_pre_content = False
                elif child_len > 1 and child_tree[child_len - 1][0] == 'newline':
                    close_pre_content = False

                close_post_whitespace = False
                close_post_content = True
                tree_len = len(tree)
                if tree_len > pointer + 2 and tree[pointer + 1][0] == 'whitespace' and tree[pointer + 2][0] == 'newline':
                    close_post_whitespace = True
                    close_post_content = False
                elif tree_len == pointer + 2 and tree[pointer + 1][0] == 'whitespace':
                    close_post_whitespace = True
                    close_post_content = False
                elif tree_len > pointer + 1 and tree[pointer + 1][0] == 'newline':
                    close_post_content = False
                elif tree_len == pointer + 1:
                    close_post_content = False

                if not close_pre_content and not close_post_content:
                    if close_pre_whitespace:
                        child_tree.pop()
                    child_tree.pop()  # preceeding newline
                    if close_post_whitespace:
                        tree.pop(pointer + 1)
                        end -= 1

                self.clean_whitespace(child_tree)

            pointer += 1
687579
private static void whitespace(StringBuilder text, int length) {
        IntStream.range(0, length).forEach(i -> text.append(" "));
    }
521370
def advance(self, id=None):
        

        if id and self.token.id != id:
            raise SyntaxError("Expected {0}".format(id))
        self.token = self.next()
1123667
def next(self):
        
        line = self.buffer.readline()

        while line == '\n':       # Skip forward to the next line with content.
            line = self.buffer.readline()

        if line == '':            # End of file.
            self.at_eof = True
            return None, None

        match = re.match('([A-Z]{2}|[C][1])\W(.*)', line)
        if match is not None:
            self.current_tag, data = match.groups()
        else:
            self.current_tag = self.last_tag
            data = line.strip()
        return self.current_tag, _cast(data)
924835
void trimWhitespaceFromFunctionEnd() {
		assert (callStack.getCurrentElement().type == PushPopType.Function);

		int functionStartPoint = callStack.getCurrentElement().functionStartInOuputStream;

		// If the start point has become -1, it means that some non-whitespace
		// text has been pushed, so it's safe to go as far back as we're able.
		if (functionStartPoint == -1) {
			functionStartPoint = 0;
		}

		// Trim whitespace from END of function call
		for (int i = outputStream.size() - 1; i >= functionStartPoint; i--) {
			RTObject obj = outputStream.get(i);

			if (!(obj instanceof StringValue))
				continue;
			StringValue txt = (StringValue) obj;

			if (obj instanceof ControlCommand)
				break;

			if (txt.isNewline() || txt.isInlineWhitespace()) {
				outputStream.remove(i);
				outputStreamDirty();
			} else {
				break;
			}
		}
	}
870165
private void skip() {
        try {
            int blockSize;
            do {
                blockSize = read();
                rawData.position(rawData.position() + blockSize);
            } while (blockSize > 0);
        } catch (IllegalArgumentException ex) {
        }
    }
584556
def leaveWhitespace( self ):
        """"""
        self.skipWhitespace = False
        self.exprs = [ e.copy() for e in self.exprs ]
        for e in self.exprs:
            e.leaveWhitespace()
        return self
875364
private int skipWhiteSpace(byte[] data, int start) {
        int index = start;
        while (index < data.length && (' ' == data[index] || '\t' == data[index])) {
            index++;
        }
        return index;
    }
1297537
def forward_word(event):
    
    buff = event.current_buffer
    pos = buff.document.find_next_word_ending(count=event.arg)

    if pos:
        buff.cursor_position += pos
913945
@SuppressWarnings("fallthrough")
    private void inlineContent() {

        skipWhitespace();
        int pos = bp;
        int depth = 1;

        loop:
        while (bp < buflen) {

            switch (ch) {
                case '\n': case '\r': case '\f':
                    newline = true;
                    // fall through

                case ' ': case '\t':
                    nextChar();
                    break;

                case '&':
                    entity(null);
                    break;

                case '<':
                    newline = false;
                    html();
                    break;

                case '{':
                    newline = false;
                    depth++;
                    nextChar();
                    break;

                case '}':
                    newline = false;
                    if (--depth == 0) {
                        nextChar();
                        return;
                    }
                    nextChar();
                    break;

                case '@':
                    if (newline)
                        break loop;
                    // fallthrough

                default:
                    nextChar();
                    break;
            }
        }

    }
492581
public void advancePagination() {
        if (pagination.isPaginated()) {
            pagination = new Pagination(pagination.getStrategy(), pagination.getOffset() + pagination.getLimit(), pagination.getLimit());
        }
    }