how to get the string without the last charecter c++ code example Example: remove last character from string c++ st = myString.substr(0, myString.size()-1);