MCPcopy Create free account
hub / github.com/LibPDF-js/core / skipWhitespaceFromCurrent

Method skipWhitespaceFromCurrent

src/parser/xref-parser.ts:494–508  ·  view source on GitHub ↗

* Skip whitespace from current scanner position.

()

Source from the content-addressed store, hash-verified

492 * Skip whitespace from current scanner position.
493 */
494 private skipWhitespaceFromCurrent(): void {
495 while (true) {
496 const byte = this.scanner.peek();
497
498 if (byte === -1) {
499 break;
500 }
501
502 if (byte === SPACE || byte === LF || byte === CR || byte === TAB) {
503 this.scanner.advance();
504 } else {
505 break;
506 }
507 }
508 }
509
510 /**
511 * Check if bytes at position match a string.

Callers 2

parseTableMethod · 0.95
parseSubsectionMethod · 0.95

Calls 2

advanceMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected