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

Function normalizedMatch

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

* Check if two arrays of lines match after Unicode normalization.

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

Source from the content-addressed store, hash-verified

75 * Check if two arrays of lines match after Unicode normalization.
76 */
77function normalizedMatch(lines: string[], pattern: string[], startIndex: number): boolean {
78 for (let i = 0; i < pattern.length; i++) {
79 if (normalizeUnicode(lines[startIndex + i] ?? "") !== normalizeUnicode(pattern[i] ?? "")) {
80 return false
81 }
82 }
83 return true
84}
85
86/**
87 * Attempt to find the sequence of pattern lines within lines beginning at or after start.

Callers 1

seekSequenceFunction · 0.85

Calls 1

normalizeUnicodeFunction · 0.85

Tested by

no test coverage detected