how to chop off last 4 characters of a string cpp code example Example: remove last character from string c++ st = myString.substr(0, myString.size()-1);