33 #ifndef _GLIBCXX_STRING 34 #define _GLIBCXX_STRING 1 36 #pragma GCC system_header 51 #if __cplusplus > 201703L 58 #if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI 59 namespace std _GLIBCXX_VISIBILITY(default)
61 _GLIBCXX_BEGIN_NAMESPACE_VERSION
63 template<
typename _Tp>
class polymorphic_allocator;
64 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
66 polymorphic_allocator<_CharT>>;
67 using string = basic_string<char>;
70 #ifdef _GLIBCXX_USE_WCHAR_T 71 using wstring = basic_string<wchar_t>;
74 _GLIBCXX_END_NAMESPACE_VERSION
78 #if __cplusplus > 201703L 79 namespace std _GLIBCXX_VISIBILITY(default)
81 _GLIBCXX_BEGIN_NAMESPACE_VERSION
82 template<
typename _CharT,
typename _Traits,
typename _Alloc,
84 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
85 erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred)
87 const auto __osz = __cont.size();
88 __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred),
90 return __osz - __cont.size();
93 template<
typename _CharT,
typename _Traits,
typename _Alloc,
typename _Up>
94 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
95 erase(basic_string<_CharT, _Traits, _Alloc>& __cont,
const _Up& __value)
97 const auto __osz = __cont.size();
98 __cont.erase(std::remove(__cont.begin(), __cont.end(), __value),
100 return __osz - __cont.size();
102 _GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
basic_string< char16_t > u16string
A string of char16_t.
basic_string< wchar_t > wstring
A string of wchar_t.
Managing sequences of characters and character-like objects.
basic_string< char32_t > u32string
A string of char32_t.