Let’s say we have a string
String data = "<span> 0397]);}}:;)]</span>";
Then we send that into an char array
Char[] charData = data.ToCharArray();
How could I go trough this data and replace all unwanted data to the end of the array but move all data left one from the current char that has been moved to make room at the end for the unwanted data.
Char[] sendToEnd = { ';', ')', '}', ']' };
I have tried a loop but it causes an infinite loop when it loops over the already swapped data.
In the end the string data should be
"<span> 0397</span>]);}}:;)]"
Also declaring
sendToEndascan give a better performance