splitJoin

This tag splits the input with the split parameter and then joins it with the join parameter.

Created by: hackvertor
Installed 1 times

Category: String

Created on: Tuesday, November 5, 2024 at 1:09:17 PM

Updated on: Wednesday, November 6, 2024 at 2:17:26 PM

This is a built in tag
Tag arguments
[
   {
      "type": "string",
      "help": "This provides the split character",
      "defaultValue": ","
   },
   {
      "type": "string",
      "help": "This provides the join character",
      "defaultValue": ","
   }
]
Code
class splitJoin {
  encode(input, splitChar, joinChar) {
    return input.split(splitChar).join(joinChar);
  }
}