Strings library

The C++ strings library includes support for two general types of strings: std::basic_string - a templated class designed to manipulate strings of any character type. Null-terminated strings - arrays of characters terminated by a special null character. std::basic_string The templated class std::basic_string generalizes how sequences of characters are manipulated and stored. String creation, manipulation, and destruction are all handled by a convenient set of class methods and relate

string literal

Syntax " (unescaped_character|escaped_character)* " (1) L " (unescaped_character|escaped_character)* " (2) u8 " (unescaped_character|escaped_character)* " (3) (since C++11) u " (unescaped_character|escaped_character)* " (4) (since C++11) U " (unescaped_character|escaped_character)* " (5) (since C++11) prefix(optional) R "delimiter( raw_character* )delimiter" (6) (since C++11) Explanation unescaped_character - Any valid character escaped_charact

string

This header is part of the strings library. Includes <initializer_list> (since C++11) Classes Name Description std::char_traits Class Template which describes properties of a character type (class template) std::char_traits<char> (class template specialization) std::char_traits<wchar_t> (class template specialization) std::char_traits<char16_t> (C++11) (class template specialization) std::char_traits<char32_t> (C++11) (class templ

streambuf

This header is part of the Input/Output library. Classes basic_streambuf abstracts a raw device (class template) Typedefs streambuf basic_streambuf<char> wstreambuf basic_streambuf<wchar_t> Synopsis namespace std { template <class charT, class traits = char_traits<charT> > class basic_streambuf; typedef basic_streambuf<char> streambuf; typedef basic_streambuf<wchar_t> wstreambuf; } Class std::basic_streambuf t

Storage class specifiers

The storage class specifiers are a part of the decl-specifier-seq of a declaration syntax. They control two independent properties of the names introduced by the declaration: their storage duration and their linkage. auto - automatic storage duration. (until C++11) register - automatic storage duration. Also hints to the compiler to place the object in the processor's register. (deprecated) (until C++17) static - static or thread storage duration and internal linkage extern - static

stdexcept

This header is part of the error handling library. Classes logic_error exception class to indicate violations of logical preconditions or class invariants (class) invalid_argument exception class to report invalid arguments (class) domain_error exception class to report domain errors (class) length_error exception class to report attempts to exceed maximum allowed size (class) out_of_range exception class to report arguments outside of expected range (class) runtim

std::_Exit

Defined in header <cstdlib> [[noreturn]] void _Exit( int exit_code ); (since C++11) Causes normal program termination to occur without completely cleaning the resources. Destructors of variables with automatic, thread local and static storage durations are not called. Functions passed to std::at_quick_exit() or std::atexit() are not called. Whether open resources such as files are closed is implementation defined. If exit_code is EXIT_FAILURE, an implementation-defined stat

std::wstring_convert::wstring_convert

explicit wstring_convert( Codecvt* pcvt = new Codecvt ); (1) wstring_convert( Codecvt* pcvt, state_type state); (2) explicit wstring_convert( const byte_string& byte_err, const wide_string& wide_err = wide_string() ); (3) wstring_convert(const std::wstring_convert&) = delete; (4) (since C++14) 1) Constructs the wstring_convert object with a specified conversion facet, using default-constructed values for the shift state and the er

std::wstring_convert::to_bytes

Defined in header <locale> byte_string to_bytes( Elem wchar ); (1) byte_string to_bytes( const Elem* wptr ); (2) byte_string to_bytes( const wide_string& wstr ); (3) byte_string to_bytes( const Elem* first, const Elem* last); (4) Performs wide to multibyte conversion, using the codecvt facet supplied at construction. 1) Converts wchar as if it was a string of length 1, to byte_string. 2) Converts the null-terminated wide character sequence beginning

std::wstring_convert::state

Defined in header <locale> state_type state() const; Returns the current value of the conversion state, which is stored in this wstring_convert object. The conversion state may be explicitly set in the constructor and is updated by all conversion operations. Return value The current conversion state. Example See also to_bytes converts a wide string into a byte string (public member function) from_bytes converts a byte string into a wide string (public memb