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

Method skipWhitespace

src/parser/xref-parser.ts:528–542  ·  view source on GitHub ↗

* Skip whitespace at given position, return new position.

(pos: number)

Source from the content-addressed store, hash-verified

526 * Skip whitespace at given position, return new position.
527 */
528 private skipWhitespace(pos: number): number {
529 const bytes = this.scanner.bytes;
530
531 while (pos < bytes.length) {
532 const byte = bytes[pos];
533
534 if (byte === SPACE || byte === LF || byte === CR || byte === TAB) {
535 pos++;
536 } else {
537 break;
538 }
539 }
540
541 return pos;
542 }
543
544 /**
545 * Read an integer at given position.

Callers 1

findStartXRefMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected