How can I remove last character from a C++ string?
I tried st = substr(st.length()-1); But it didn\'t work.
st = substr(st.length()-1);
For a non-mutating version:
st = myString.substr(0, myString.size()-1);