How do I add a backspace code to my code that will delete the o from Hello
?
For example, Hello
would become Hell
.
I have tried to use 
, but it is illegal in XML.
How do I add a backspace code to my code that will delete the o from Hello
?
For example, Hello
would become Hell
.
I have tried to use 
, but it is illegal in XML.
Backspace as a control character exists from the days of devices like teletypes, and from paper tape where physical deletion of a character was impossible. As far as I know there are very few applications today that will recognize and interpret the semantics of a backspace in a character stream. That's why it's not supported in XML. If you want to delete a character, simply delete the character.
If you can get it in a string or other sliceable type, there's always slicing; in this case, you'd do something like:
x = 'hello'
'hello'
x[:-1]
'hell'
x[:4]
'hell'