π¨ basic_text (In Progress)ο
Warning
π¨ This isnβt finished yet! Come check back by the next major or minor version update.
The basic_text class provides functionality similar to std::string but for performing it on encoded, normalized text.
-
template<typename _Encoding, typename _NormalizationForm = nfkc, typename _Range = __txt_detail::__default_char_range_t<code_unit_t<_Encoding>>>
class basic_textο A wrapper (container adapter) that takes the given
_Encodingtype and_NormalizationFormtype and imposes it over the given chosen_Rangestorage for the purposes of allowing users to examine the text.- Template Parameters:
_Encoding β The encoding to store any input and presented text as.
_NormalizationForm β The normalization form to impose on the stored textβs sequences.
_Range β The container type that will be stored within this ztd::text::basic_text using the code units from the
_Encodingtype._ErrorHandler β The default error handler to use for any and all operations on text. Generally, most operations will provide room to override this.
Public Types
-
using encoding_type = _Encodingο
The encoding type that this view is using to interpret the underlying sequence of code units.
-
using normalization_type = _NormalizationFormο
The normalization form type this view is imposing on top of the encoded sequence.
-
using code_point = code_point_t<_UEncoding>ο
The code point type when the underlying storage is decoded.
-
using code_unit = code_unit_t<_UEncoding>ο
The code unit type expected by the underlying storage.
-
using iterator = basic_text_view_iterator<_UEncoding, _UNormalizationForm, ::ztd::ranges::reconstruct_t<_CVRange>>ο
FIXME.
-
using const_iterator = basic_text_view_iterator<_UEncoding, _UNormalizationForm, ::ztd::ranges::reconstruct_t<const _CVRange>>ο
FIXME.
-
using sentinel = text_view_sentinel_tο
FIXME.
-
using const_sentinel = text_view_sentinel_tο
FIXME.
-
using value_type = code_pointο
The type for the basic iterators.
-
using reference = code_pointο
The type for the basic iterators.
Public Functions
-
constexpr basic_text(const basic_text&) = defaultο
Copy constructor. Defaulted.
-
constexpr basic_text(basic_text&&) = defaultο
Move constructor. Defaulted.
-
constexpr basic_text &operator=(const basic_text&) = defaultο
Copy assignment operator. Defaulted.
-
constexpr basic_text &operator=(basic_text&&) = defaultο
Move assignment operator. Defaulted.
-
inline constexpr basic_text() noexcept(::std::is_nothrow_constructible_v<basic_text, ::std::in_place_t>)ο
Constructs a basic text, using the default constructor for all held components.
-
template<typename _Input>
inline constexpr basic_text(::ztd::ranges::from_range_t, _Input &&__input) noexcept(_S_constructor_from_range_noexcept<_Input>())ο Constructs from a given range, performing a conversion from code points if necessary.
-
template<typename _Input, typename _FromEncoding>
inline constexpr basic_text(::ztd::ranges::from_range_t, _Input &&__input, _FromEncoding &&__from_encoding) noexcept(_S_constructor_from_range_noexcept<_Input, _FromEncoding>())ο Constructs from a given range, performing a conversion from code points if necessary.
-
template<typename _Input, typename _FromEncoding, typename _ErrorHandler>
inline constexpr basic_text(::ztd::ranges::from_range_t, _Input &&__input, _FromEncoding &&__from_encoding, _ErrorHandler &&__error_handler) noexcept(_S_constructor_from_range_noexcept<_Input, _FromEncoding, _ErrorHandler>())ο Constructs from a given range, performing a conversion from code points if necessary.
-
using ztd::text::ntext = basic_text<execution_t>ο
A container for storing text in the locale, runtime-based encoding.
-
using ztd::text::wtext = basic_text<wide_execution_t>ο
A container for storing text in the locale, runtime-based wide encoding.
-
using ztd::text::nltext = basic_text<literal_t>ο
A container for storing text in the string literal_t encoding.
-
using ztd::text::wltext = basic_text<wide_literal_t>ο
A container for storing text in the wide string literal_t encoding.
-
using ztd::text::u8text = basic_text<utf8_t>ο
A container for storing text in the UTF-8 encoding.
-
using ztd::text::u16text = basic_text<utf16_t>ο
A container for storing text in the UTF-16 encoding.
-
using ztd::text::u32text = basic_text<utf32_t>ο
A container for storing text in the UTF-32 encoding.