Namespaces
Variants
Views
Actions

std::basic_string<CharT,Traits,Allocator>::pop_back

From cppreference.com
< cpp‎ | string‎ | basic string
Revision as of 00:04, 18 February 2020 by Fruderica (Talk | contribs)

 
 
 
std::basic_string
Member functions
Element access
Iterators
Capacity
Modifiers
basic_string::pop_back
(DR*)
Search
Operations
Constants
Non-member functions
I/O
Comparison
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
Numeric conversions
(C++11)(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
Literals
Helper classes
Deduction guides (C++17)

 
void pop_back();
(since C++11)
(until C++20)
constexpr void pop_back();
(since C++20)

Removes the last character from the string.

Equivalent to erase(end()-1). The behavior is undefined if the string is empty.

Contents

Parameters

(none)

Return value

(none)

Complexity

Constant.

Exceptions

Throws nothing.

See also

appends a character to the end
(public member function) [edit]
removes characters
(public member function) [edit]