Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

string.replaceAll()

Replace all occurrences of a String.

Signature

replaceAll(match: String, replace: String) => String

Description

The replaceAll() method returns a string with all occurrences of match replaced by replacement.

Parameters

Parameter Type Required Description

match

String

Yes

String to match on in the input string.

replace

String

Yes

String to replace match with.

Return value

Type Description

String

String with all occurrences of match replaced by replace.

Examples

'foobar'.replaceAll('foo', 'bar')
"barbar"

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!