15 lines
309 B
TypeScript
Raw Permalink Normal View History

2024-11-05 10:09:18 +08:00
import { baseIndexOf } from './_baseIndexOf'
export function charsStartIndex(strSymbols: string[], chrSymbols: string[]) {
let index = -1
const length = strSymbols.length
while (
++index < length &&
baseIndexOf(chrSymbols, strSymbols[index], 0) > -1
) {
/* empty */
}
return index
}