Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ string remove first character

string name = "My String";

// To remove First character
name.erase(name.begin());
// To remove Last character
name.pop_back();
std::cout << name << std::endl;
// Output : y Strin
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #remove #character
ADD COMMENT
Topic
Name
1+7 =