33#ifndef _GLIBCXX_STRING
34#define _GLIBCXX_STRING 1
37#pragma GCC system_header
59#define __glibcxx_want_algorithm_default_value_type
60#define __glibcxx_want_allocator_traits_is_always_equal
61#define __glibcxx_want_constexpr_char_traits
62#define __glibcxx_want_constexpr_string
63#define __glibcxx_want_erase_if
64#define __glibcxx_want_nonmember_container_access
65#define __glibcxx_want_string_resize_and_overwrite
66#define __glibcxx_want_string_udls
67#define __glibcxx_want_to_string
70#if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
72namespace std _GLIBCXX_VISIBILITY(default)
74_GLIBCXX_BEGIN_NAMESPACE_VERSION
76 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
78 polymorphic_allocator<_CharT>>;
79 using string = basic_string<char>;
80#ifdef _GLIBCXX_USE_CHAR8_T
81 using u8string = basic_string<char8_t>;
85 using wstring = basic_string<wchar_t>;
87_GLIBCXX_END_NAMESPACE_VERSION
91#ifdef __cpp_lib_erase_if
92namespace std _GLIBCXX_VISIBILITY(default)
94_GLIBCXX_BEGIN_NAMESPACE_VERSION
96 template<
typename _CharT,
typename _Traits,
typename _Alloc,
99 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
100 erase_if(basic_string<_CharT, _Traits, _Alloc>&
__cont, _Predicate __pred)
103 const auto __osz =
__cont.size();
104 const auto __end =
__cont.end();
105 auto __removed = std::__remove_if(
__cont.begin(), __end,
106 __ops::__pred_iter(std::ref(__pred)));
107 __cont.erase(__removed, __end);
108 return __osz -
__cont.size();
111 template<
typename _CharT,
typename _Traits,
typename _Alloc,
112 typename _Up _GLIBCXX26_DEF_VAL_T(_CharT)>
114 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
115 erase(basic_string<_CharT, _Traits, _Alloc>&
__cont,
const _Up& __value)
118 const auto __osz =
__cont.size();
119 const auto __end =
__cont.end();
120 auto __removed = std::__remove_if(
__cont.begin(), __end,
121 __ops::__iter_equals_val(__value));
122 __cont.erase(__removed, __end);
123 return __osz -
__cont.size();
125_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.