Remove last character from C++ string October 3, 2022 by Tarik Simple solution if you are using C++11. Probably O(1) time as well: st.pop_back();