Function findSubstringIndexes
- findSubstringIndexes<IncludeLength extends undefined | boolean>(
__namedParameters: {
caseSensitive: boolean;
includeLength?: IncludeLength;
searchFor: string | RegExp;
searchIn: string;
},
): IncludeLength extends true
? { index: number; length: number }[]
: number[] Type Parameters
- IncludeLength extends undefined | boolean
Parameters
- __namedParameters: {
caseSensitive: boolean;
includeLength?: IncludeLength;
searchFor: string | RegExp;
searchIn: string;
}caseSensitive: boolean
searchFor: string | RegExp
searchIn: string
Returns IncludeLength extends true ? { index: number; length: number }[] : number[]
Finds all indexes of a
searchFor
string or RegExp insearchIn
. Ths is similar to''.indexOf
except that it finds all indexes of.