c++ string erase first character code example
Example 1: how to remove first letter of a string python
s = "hello"
print s[1:]
Example 2: remove or erase first and last character of string c++
str.pop_back(); // removes last /back character from str
str.erase(str.begin()); // removes first/front character from str
Example 3: pop off end of string c++
#include <string>
int main() {
std::string str = "Hello, World!";
str.pop_back(); // str is now "Hello, World"
}