FCF 2.0 development in progress...
> > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

fcf.replaceAll() function

string fcf.replaceAll(string a_str, string a_search, string a_replacement)

Package: fcf-framework-core

File: fcf-framework-core:fcf.js

Available from version: 2.0.2

Performs replacement of all searched substrings in a string

Arguments

string a_str
- Source string

string a_search
- Search substring

string a_replacement
- Replacement string
Result
string
- String with substrings replaced

Example: Function application

let newString = fcf.replaceAll("Some text: 123", "123", "987"); console.log(newString);

Output:

Some text: 987