I need an string helper to replace everything within the square brackets with variables. using javascript
"Hello, [0]".modify(["ABC"])
"Heelo, [0], This is [1]".modify(["ABC", "XYZ"])
"Heelo, [0], This is [1], Your email address is [2]".modify(["ABC", "XYZ", "abcdef@example.com"])
So basically the modify() will take the array and replace the string with appropriate indexs.
Any advice would be helpful.