}
function leftIsWordBounday(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean {
textModelSearch.ts
if (matchStartIndex === 0) {
// Match starts at start of string
return true;
}
const charBefore = text.charCodeAt(matchStartIndex - 1);
if (wordSeparators.get(charBefore) !== WordCharacterClass.Regular) {
// The character before the match is a word separator
return true;
}
if (charBefore === CharCode.CarriageReturn || charBefore === CharCode.LineFeed) {
textModelSearch.ts
// The character before the match is line break or carriage return.
return true;