replaceMultipleCharactersForList
Modified on Fri, 18 Aug 2023
Description
Replace multiple characters in a list of strings according to a given mapping
Syntax
replaceMultipleCharactersForList(array, replacements)
Parameters
| Input Parameter | Type | Description |
|---|---|---|
| array | Array | The list of input strings to perform replacements on |
| replacements | object | An object containing characters to replace and their corresponding replacements |
Return value
| Type |
|---|
| Array<any> |
Sample
| Example | Result | Description |
|---|---|---|
| replaceMultipleCharactersForList(['abcd', '$12.34'], { 'a': '10', 'c': '20', '$': '', '.' : ',' }) | ['10b20d', '12,34'] | The list of input strings with specified characters replaced |
To view all the List functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article