SourceTermAnalysisSystem_vue/node_modules/xml-utils/index-of-match-end.mjs
2026-05-15 10:22:44 +08:00

7 lines
238 B
JavaScript

export default function indexOfMatchEnd(xml, pattern, startIndex) {
const re = new RegExp(pattern);
const match = re.exec(xml.slice(startIndex));
if (match) return startIndex + match.index + match[0].length - 1;
else return -1;
}