This program I'm working on is supposed to replace all occurrences of a string-1 (user defined) with a preferred string-2 (user defined).
1 2 3
//tb = a richTextBox, I just shorten it to make coding less tedious.
tb1->Rtf = tb1->Rft->Replace (tb2->Rtf, tb3->Rtf);
I would like to keep it as "Rtf" instead of "Text", because I don't want to lose the format (colors, font, etc).
However the output always produces a newline, and I can't seem to get rid of it.
Example Only:
1 2 3 4 5 6
//tb1 = "Hey World"
//tb2 = "Hey"
//tb3 = "Hello"
//-----------------
//This code is meant to replace "Hey" with "Hello".
//However, it gives a new line, like below: