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

Method _peekStr

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

Source from the content-addressed store, hash-verified

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