Prism · Strings

$replace

Swaps the first occurrence of search in a string for replacement, or every occurrence with all: true.

The source
{ csv: 'apple,banana,cherry' }
The config
{
  $replace: {
    value: { $ref: '$.csv' },
    search: 'banana',
    replacement: '***',
  },
}
What comes out
'apple,***,cherry'
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.