@tempots/std

replaceAll() function

Replaces all occurrances of placeholder in subject with the value replacement.

Signature:

replaceAll: (subject: string, placeholder: string, replacement: string) => string

Parameters

Parameter

Type

Description

subject

string

The string to search in.

placeholder

string

The string to search for.

replacement

string

The string to replace placeholder with.

Returns: string

The string with all occurrances of placeholder replaced by replacement.