SlickEdit Community
SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: tsunokawa on November 13, 2019, 11:29:36 PM
-
Hello
How do I replace specific strings in a _str variable with another string.
Here is an example describing what I want to do.
_str before = "ABC";
_str searched = "B";
_str replacedWith = "D";
_str after;
after = xxxxx(before, searched, replacedWith); // after = "ADC"
Is there any way to do this? It would be nice if I can use regular expression for "searched" string above.
Thank you.
-
See the stranslate function.
Also help -> macro functions by category -> string functions.
-
Thank you very much, Graeme.
That is just what I searched for. And it worked well.
Thank you again.