MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / skipWhiteSpace

Method skipWhiteSpace

src/main/java/org/htmlunit/http/HttpUtils.java:328–339  ·  view source on GitHub ↗

Skips semantically insignificant whitespace characters and moves the cursor to the closest non-whitespace character. @param buf buffer with the sequence of chars to be parsed @param range defines the bounds and current position of the buffer

(final String buf, final ParseRange range)

Source from the content-addressed store, hash-verified

326 * @param range defines the bounds and current position of the buffer
327 */
328 private static void skipWhiteSpace(final String buf, final ParseRange range) {
329 int pos = range.getPos();
330 final int indexTo = range.getUpperBound();
331
332 for (int i = pos; i < indexTo; i++) {
333 if (!isWhitespace(buf.charAt(i))) {
334 break;
335 }
336 pos++;
337 }
338 range.updatePos(pos);
339 }
340
341 /**
342 * Transfers content into the destination buffer until a whitespace character or any of

Callers 1

parseTokenMethod · 0.95

Calls 4

isWhitespaceMethod · 0.95
getPosMethod · 0.80
getUpperBoundMethod · 0.80
updatePosMethod · 0.80

Tested by

no test coverage detected