MCPcopy Create free account
hub / github.com/angular/angular / _peekStr

Method _peekStr

packages/compiler/src/ml_parser/lexer.ts:678–691  ·  view source on GitHub ↗
(chars: string)

Source from the content-addressed store, hash-verified

676 }
677
678 private _peekStr(chars: string): boolean {
679 const len = chars.length;
680 if (this._cursor.charsLeft() < len) {
681 return false;
682 }
683 const cursor = this._cursor.clone();
684 for (let i = 0; i < len; i++) {
685 if (cursor.peek() !== chars.charCodeAt(i)) {
686 return false;
687 }
688 cursor.advance();
689 }
690 return true;
691 }
692
693 private _isBlockStart(): boolean {
694 return (

Callers 2

_isBlockStartMethod · 0.95
_isLetStartMethod · 0.95

Calls 4

charsLeftMethod · 0.65
cloneMethod · 0.65
peekMethod · 0.65
advanceMethod · 0.65

Tested by

no test coverage detected