RCString removeRepetitions of symbol and substring added.