sp core library.text_2.replaceall - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki
Home > @microsoft/sp-core-library > Text_2 > replaceAll
Returns the input string, with all instances of searchValue replaced by replaceValue.
Signature:
static replaceAll(input: string, searchValue: string, replaceValue: string): string;| Parameter | Type | Description |
|---|---|---|
| input | string | The string to be modified |
| searchValue | string | The value to search for |
| replaceValue | string | The replacement text |
Returns:
string
Note that JavaScript's string.replace() only replaces the first match, unless a global RegExp is provided.