std::basic_string<CharT, Traits,std::pmr::polymorphic_allocator<CharT>>; } (2) (C++17 起) 类模板basic_string存储和处理字符式对象的序列,这种对象是满足平凡类型(TrivialType)和标准布局类型(StandardLayoutType)的非数组对象。该类既不依赖字符类型,也不依赖该类型上的原生操作。操作的定义通过Traits模板形...
basic_string&erase(size_type index=0, size_type count=npos); (C++20 前) constexprbasic_string&erase(size_type index=0, size_type count=npos); (C++20 起) (2) iterator erase(iterator position); (C++11 前) iterator erase(const_iterator position); ...
1)Equivalent toreturnbasic_string(*this, pos, count);. 2)Equivalent toreturnbasic_string(std::move(*this), pos, count);. Parameters pos-position of the first character to include count-length of the substring Return value String containing the substring[pos,pos+count)or[pos,size()). ...
std::basic_string_view Defined in header<string_view> template< classCharT, classTraits=std::char_traits<CharT> >classbasic_string_view; (since C++17) The class templatebasic_string_viewdescribes an object that can refer to a constant contiguous sequence ofCharTwith the first element of the ...
sbElstd::basic_stringbuf<CharT, Traits, Allocator>usado como el búfer subyacente. (objeto miembro solo de exposición*) Funciones miembro (constructor) construye la corriente de cadena Original: constructs the string stream The text has been machine-translated viaGoogle Translate. ...
Defined in header <string> Type Definition std::string std::basic_string<char> std::wstring std::basic_string<wchar_t> std::u8string (C++20) std::basic_string<char8_t> std::u16string (C++11) std::basic_string<char16_t> std::u32string (C++11) std::basic_string<char32_...
L'interface complète pour les membres basic_stringbuf uniques est fourni . Original: The class template basic_stringstream implements input/output operations on memory (std::basic_string) based streams. It essentially wraps a raw string device implementation (basic_stringbuf) into a higher-level ...
std::basic_string::reserve void reserve( size_type new_cap = 0 ); 通知std::basic_string对象的计划更改大小,以便它可以适当地管理存储分配。 如果new_cap大于当前capacity(),则分配新存储空间,以及capacity()等于或大于new_cap... 如果new_cap比电流小capacity(),这是一个非绑定收缩请求。
> class basic_stringstream; (desde C++11) O modelo de classe implementa basic_stringstream de entrada / saída operações em memória (std::basic_string) fluxos baseados. É, essencialmente, envolve uma aplicação de dispositivo bruto corda (basic_stringbuf) em uma interface de nível...
> class basic_stringstream; (seit C++11) Das Klassen-Template basic_stringstream implementiert Input / Output Operationen auf Speicher (std::basic_string) basierten Datenströme. Es besteht im wesentlichen umschließt einen rohen String Geräteimplementierung (basic_stringbuf) in einer über...