MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / exactMatch

Function exactMatch

src/core/tools/apply-patch/seek-sequence.ts:41–48  ·  view source on GitHub ↗

* Check if two arrays of lines match exactly.

(lines: string[], pattern: string[], startIndex: number)

Source from the content-addressed store, hash-verified

39 * Check if two arrays of lines match exactly.
40 */
41function exactMatch(lines: string[], pattern: string[], startIndex: number): boolean {
42 for (let i = 0; i < pattern.length; i++) {
43 if (lines[startIndex + i] !== pattern[i]) {
44 return false
45 }
46 }
47 return true
48}
49
50/**
51 * Check if two arrays of lines match after trimming trailing whitespace.

Callers 1

seekSequenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected