libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ back() [3/4]

template<typename _CharT, typename _Traits, typename _Alloc>
const_reference std::basic_string< _CharT, _Traits, _Alloc >::back ( ) const
inlinenoexcept

Returns a read-only (constant) reference to the data at the last element of the string.

Definition at line 1242 of file cow_string.h.

1243 {
1245 return operator[](this->size() - 1);
1246 }
#define __glibcxx_assert(cond)
constexpr size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
constexpr bool empty() const noexcept
constexpr const_reference operator[](size_type __pos) const noexcept
Subscript access to the data contained in the string.