# std::basic_string::pop_back

From cppreference.com
< cpp‎ | string‎ | basic string

void pop_back(); |  | (since C++11)

Removes the last character from the string.

Equivalent to erase(size()-1, 1), except the behavior is undefined if the string is empty.

### Parameters

(none)

### Return value

(none)

### Complexity

Constant.

### Exceptions

Does not throw

### See also

push_back | appends a character to the end (public member function)
erase | removes characters (public member function)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/string/basic_string/pop_back&oldid=75326"