replaceAll

This tag does a string replace all without a regex.

Created by: hackvertor
Installed 1 times

Category: String

Created on: Tuesday, September 24, 2024 at 11:40:59 AM

Updated on: Tuesday, September 24, 2024 at 11:40:59 AM

This is a built in tag

Tag arguments
[
   {
      "type": "string",
      "help": "This is used to find the string",
      "defaultValue": "find"
   },
   {
      "type": "string",
      "help": "This is used to replace the string",
      "defaultValue": "replace"
   }
]
Code
class replaceAll {
  encode(input, find, replace) {
     return input.replaceAll(find, replace);
  }
}