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

Method skipEOL

src/parser/xref-parser.ts:477–489  ·  view source on GitHub ↗

* Skip EOL characters (CR, LF, or CRLF).

()

Source from the content-addressed store, hash-verified

475 * Skip EOL characters (CR, LF, or CRLF).
476 */
477 private skipEOL(): void {
478 const byte = this.scanner.peek();
479
480 if (byte === CR) {
481 this.scanner.advance();
482
483 if (this.scanner.peek() === LF) {
484 this.scanner.advance();
485 }
486 } else if (byte === LF) {
487 this.scanner.advance();
488 }
489 }
490
491 /**
492 * Skip whitespace from current scanner position.

Callers 1

parseEntryMethod · 0.95

Calls 2

advanceMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected