33#ifndef _GLIBCXX_STRING
34#define _GLIBCXX_STRING 1
36#pragma GCC system_header
57#if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
59namespace std _GLIBCXX_VISIBILITY(default)
61_GLIBCXX_BEGIN_NAMESPACE_VERSION
63 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
65 polymorphic_allocator<_CharT>>;
66 using string = basic_string<char>;
67#ifdef _GLIBCXX_USE_CHAR8_T
68 using u8string = basic_string<char8_t>;
72 using wstring = basic_string<wchar_t>;
74_GLIBCXX_END_NAMESPACE_VERSION
78#if __cplusplus > 201703L
79namespace std _GLIBCXX_VISIBILITY(default)
81_GLIBCXX_BEGIN_NAMESPACE_VERSION
83#define __cpp_lib_erase_if 202002L
85 template<
typename _CharT,
typename _Traits,
typename _Alloc,
88 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
89 erase_if(basic_string<_CharT, _Traits, _Alloc>&
__cont, _Predicate __pred)
92 const auto __osz =
__cont.size();
93 const auto __end =
__cont.end();
94 auto __removed = std::__remove_if(
__cont.begin(), __end,
95 __ops::__pred_iter(std::ref(__pred)));
96 __cont.erase(__removed, __end);
97 return __osz -
__cont.size();
100 template<
typename _CharT,
typename _Traits,
typename _Alloc,
typename _Up>
102 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
103 erase(basic_string<_CharT, _Traits, _Alloc>&
__cont,
const _Up& __value)
106 const auto __osz =
__cont.size();
107 const auto __end =
__cont.end();
108 auto __removed = std::__remove_if(
__cont.begin(), __end,
109 __ops::__iter_equals_val(__value));
110 __cont.erase(__removed, __end);
111 return __osz -
__cont.size();
113_GLIBCXX_END_NAMESPACE_VERSION
basic_string< char > string
A string of char.
basic_string< char32_t > u32string
A string of char32_t.
basic_string< char16_t > u16string
A string of char16_t.
basic_string< wchar_t > wstring
A string of wchar_t.
ISO C++ entities toplevel namespace is std.
GNU extensions for public use.
Managing sequences of characters and character-like objects.