I'm trying to remove a character from inside a string, say, 3 spaces from the end. I'm using this to act as typing on a screen in a game in unity, think like a text editor, where you can use the arrow keys to move the cursor inside of the string to remove characters. For example,
You can use the
String.Remove overload which takes the starting point and number of characters to be removed:
string str = "Hello World!"; string resultStr = str.Remove(str.Length - 4, 1);
Make sure to check the string length first.