how to strip last character in string C++ code example Example: remove last character from string c++ st = myString.substr(0, myString.size()-1);