Home > @rushstack/node-core-library > Text > replaceAll
Text.replaceAll() method
Returns the same thing as targetString.replace(searchValue, replaceValue), except that all matches are replaced, rather than just the first match.
Signature:
static replaceAll(input: string, searchValue: string, replaceValue: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
input | string | The string to be modified |
searchValue | string | The value to search for |
replaceValue | string | The replacement text |
Returns:
string