G
Guest
Hello
In a C++ program, I would like to change the string
"ty^Hypescript ^H ^H^H ^H^H ^H^H ^H^H ^H^H ^H^H ^H^
^H^H ^H^H ^H^H ^H^G^G^G^G^Gty^Hypescript ^H ^H^H ^H^H ^H^H ^H^M"
into the string
"typescript"
The letters like '^H', '^H^H', and '^G' represents some of the ANSI control characters such as backspace. (the characters are shown on VI editor.
So, I think it's possible to process control characters within a code, like a VT100 virtual terminal does.( In deed, I am not sure whether the process is done in a terminal, shell or whatever.
If you have a sample code or a function to suggest, please post them. Thank you.
In a C++ program, I would like to change the string
"ty^Hypescript ^H ^H^H ^H^H ^H^H ^H^H ^H^H ^H^H ^H^
^H^H ^H^H ^H^H ^H^G^G^G^G^Gty^Hypescript ^H ^H^H ^H^H ^H^H ^H^M"
into the string
"typescript"
The letters like '^H', '^H^H', and '^G' represents some of the ANSI control characters such as backspace. (the characters are shown on VI editor.
So, I think it's possible to process control characters within a code, like a VT100 virtual terminal does.( In deed, I am not sure whether the process is done in a terminal, shell or whatever.
If you have a sample code or a function to suggest, please post them. Thank you.