Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.text_2.replaceall

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > Text_2 > replaceAll

Text_2.replaceAll() method

Returns the input string, with all instances of searchValue replaced by replaceValue.

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

Remarks

Note that JavaScript's string.replace() only replaces the first match, unless a global RegExp is provided.

Clone this wiki locally