fn

collectFixedCharacters

tested

Collect the contiguous run of fixed (literal) characters starting at startIndex, stopping at the first matcher slot or the end of the mask. These are auto-inserted before the next typed character (and a literal the user happens to type is harmlessly dropped at the following matcher slot).

Signature

ts
export function collectFixedCharacters(mask: ReadonlyArray<RegExp | string>, startIndex: number): string{ ... }

Parameters

ParameterTypeDescription
maskReadonlyArray<RegExp | string>
startIndexnumber

Returns

string