![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
A string type with a fixed maximum capacity, where the data is stored internally without allocations. More...

Public Member Functions | |
| constexpr | inline_string () noexcept=default |
| Default-construct an empty string. | |
| template<std::size_t N> | |
| constexpr | inline_string (detail::character const (&str)[N]) noexcept |
| Construct from the source string literal. | |
| constexpr | inline_string (detail::raw_c_string const str) noexcept |
| Construct from the provided NUL-terminated string. | |
| constexpr | inline_string (inline_string &&)=default |
| Default move construction. | |
| constexpr | inline_string (inline_string const &)=default |
| Default copy construction. | |
| template<size_type OtherMaxLength, constraints< std::enable_if_t<(OtherMaxLength<=MaxSize)> > = nullptr> | |
| constexpr | inline_string (inline_string< OtherMaxLength > const &other) noexcept |
Implicit conversion from another inline_string which can provably fit in this inline_string. | |
| template<size_type OtherMaxLength, constraints< std::enable_if_t<(OtherMaxLength > MaxSize)>> | |
| constexpr | inline_string (inline_string< OtherMaxLength > const &other) noexcept |
Explicit conversion from another inline_string which cannot provably fit in this inline_string. | |
| template<typename InputIterator, constraints< std::enable_if_t< is_input_iterator_v< InputIterator > > > = nullptr> | |
| constexpr | inline_string (InputIterator const first, InputIterator const last) noexcept(denotes_nothrow_iterable_range_v< InputIterator >) |
| Construction from a sequence of characters represented as a pair of iterators. | |
| constexpr | inline_string (size_type len, detail::character chr) noexcept |
Construct a pre-filled inline_string of a given length. | |
| constexpr | inline_string (string_view const str) noexcept |
| Construct from the provided string_view. | |
| ~inline_string ()=default | |
| Use the default destructor. | |
| constexpr auto | append (detail::character rhs) noexcept -> inline_string & |
| Append a character to the current string. | |
| constexpr auto | append (detail::raw_c_string rhs, size_type count) noexcept -> inline_string & |
| Append a string specified as pointer and length to the current string. | |
| constexpr auto | append (size_type count, detail::character chr) noexcept -> inline_string & |
| Append the specified number of copies of a character to the string. | |
| constexpr auto | append (std::initializer_list< detail::character > rhs) noexcept -> inline_string & |
| Append a series of characters from an initializer list to the string. | |
| constexpr auto | append (string_view rhs) noexcept -> inline_string & |
| Append a string to the current string. | |
| constexpr auto | append (string_view rhs, size_type pos) noexcept -> inline_string & |
| Append a substring of a string to the current string. | |
| constexpr auto | append (string_view rhs, size_type pos, size_type count) noexcept -> inline_string & |
| Append a substring of a string to the current string. | |
| constexpr auto | assign (detail::character chr) noexcept -> inline_string & |
| Assign from a single character. | |
| constexpr auto | assign (detail::raw_c_string str, size_type count) noexcept -> inline_string & |
| Assign from a string specified as pointer and length to the current string. | |
| constexpr auto | assign (size_type count, detail::character chr) noexcept -> inline_string & |
| Assign repeated copies of a single character. | |
| constexpr auto | assign (std::initializer_list< detail::character > str) noexcept -> inline_string & |
| Assign from an initializer list of characters. | |
| constexpr auto | assign (string_view str) noexcept -> inline_string & |
| Assign from a string_view. | |
| constexpr auto | assign (string_view str, size_type pos) noexcept -> inline_string & |
| Assign from a string_view. | |
| constexpr auto | assign (string_view str, size_type pos, size_type count) noexcept -> inline_string & |
| Assign from a substring of a string_view starting at the specified position, with the specified max length. | |
| ARENE_NODISCARD constexpr auto | back () const noexcept -> detail::character const & |
| Get the last character in the string. | |
| ARENE_NODISCARD constexpr auto | back () noexcept -> detail::character & |
| Get the last character in the string. | |
| ARENE_NODISCARD constexpr auto | begin () const noexcept -> const_iterator |
| Iterator to the first position in the string. | |
| ARENE_NODISCARD constexpr auto | begin () noexcept -> iterator |
| Iterator to the first position in the string. | |
| ARENE_NODISCARD constexpr auto | c_str () const noexcept -> detail::raw_c_string |
Return a pointer to the NUL-terminated string held in *this. | |
| ARENE_NODISCARD constexpr auto | cbegin () const noexcept -> const_iterator |
| Iterator to the first position in the string. | |
| ARENE_NODISCARD constexpr auto | cend () const noexcept -> const_iterator |
| Return an iterator to one-past-the-last position in the string. | |
| constexpr void | clear () noexcept |
| Clear the string, so it is empty. | |
| ARENE_NODISCARD constexpr auto | compare (size_type pos, size_type count, string_view other) const noexcept -> integral_comparison_result |
| Compare a substring against another string, to see if it is less than, equal to or greater than the other. | |
| ARENE_NODISCARD constexpr auto | compare (size_type pos, size_type count, string_view other, size_type pos2) const noexcept -> integral_comparison_result |
| Compare a substring against a substring of another string, to see if it is less than, equal to or greater than the other. | |
| ARENE_NODISCARD constexpr auto | compare (size_type pos, size_type length1, detail::raw_c_string other, size_type length2) const noexcept -> integral_comparison_result |
| Compare a substring against another string, to see if it is less than, equal to or greater than the other. | |
| ARENE_NODISCARD constexpr auto | compare (size_type pos, size_type length1, string_view other, size_type pos2, size_type length2) const noexcept -> integral_comparison_result |
| Compare a substring against a substring of another string, to see if it is less than, equal to or greater than the other. | |
| ARENE_NODISCARD constexpr auto | compare (string_view other) const noexcept -> integral_comparison_result |
| Compare against another string, to see if it is less than, equal to or greater than the other. | |
| constexpr auto | copy (detail::character *str, size_type count) const -> size_type |
| Copy the string into the specified buffer up to the specified maximum length. | |
| constexpr auto | copy (detail::character *str, size_type count, size_type pos) const -> size_type |
| Copy the substring starting at the specified position into the specified buffer up to the specified maximum length. | |
| ARENE_NODISCARD auto | crbegin () const noexcept -> const_reverse_iterator |
| Return an iterator to the start of the reversed string. | |
| ARENE_NODISCARD auto | crend () const noexcept -> const_reverse_iterator |
| Return an iterator to the end of the reversed string. | |
| ARENE_NODISCARD constexpr auto | data () const noexcept -> detail::raw_c_string |
Return a pointer to the NUL-terminated string held in *this. | |
| ARENE_NODISCARD constexpr auto | data () noexcept -> detail::character * |
Return a pointer to the NUL-terminated string held in *this. | |
| ARENE_NODISCARD constexpr auto | empty () const noexcept -> bool |
| Check if the string is empty. | |
| ARENE_NODISCARD constexpr auto | end () const noexcept -> const_iterator |
| Return an iterator to one-past-the-last position in the string. | |
| ARENE_NODISCARD constexpr auto | end () noexcept -> iterator |
| The one-past-the-last position in the string. | |
| ARENE_NODISCARD constexpr auto | ends_with (detail::character chr) const noexcept -> bool |
| Check if the string ends with a character. | |
| ARENE_NODISCARD constexpr auto | ends_with (string_view str) const noexcept -> bool |
| Check if the string ends with another string. | |
| constexpr auto | erase () noexcept -> inline_string & |
| Erase all the characters in the string. | |
| constexpr auto | erase (const_iterator first, const_iterator last) noexcept -> iterator |
| Erase the characters in the specified range. | |
| constexpr auto | erase (const_iterator pos) noexcept -> iterator |
| Erase the character at the specified range. | |
| constexpr auto | erase (size_type pos) -> inline_string & |
| Erase characters from the string starting at the specified position to the end of the string. | |
| constexpr auto | erase (size_type pos, size_type count) noexcept -> inline_string & |
| Erase the specified number of characters in the string starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | find (detail::character chr) const noexcept -> size_type |
| Find the earliest position of the specified character within the string. | |
| ARENE_NODISCARD constexpr auto | find (detail::character chr, size_type pos) const noexcept -> size_type |
| Find the earliest position of the specified character within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | find (detail::raw_c_string str) const noexcept -> size_type |
| Find the earliest position of the given substring within the string. | |
| ARENE_NODISCARD constexpr auto | find (detail::raw_c_string str, size_type pos) const noexcept -> size_type |
| Find the earliest position of the given substring within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | find (detail::raw_c_string str, size_type pos, size_type count) const noexcept -> size_type |
Find the earliest position of the n character string starting at str within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | find (string_view str, size_type pos=0U) const noexcept -> size_type |
| Find the earliest position of the given substring within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (detail::character chr) const noexcept -> size_type |
| Find the earliest position such that the character at that position is the provided character. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (detail::character chr, size_type pos) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is not the provided character. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (detail::raw_c_string str) const noexcept -> size_type |
| Find the earliest position such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (detail::raw_c_string str, size_type pos) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (detail::raw_c_string str, size_type pos, size_type count) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (string_view str) const noexcept -> size_type |
| Find the earliest position such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_not_of (string_view str, size_type pos) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_of (detail::character chr) const noexcept -> size_type |
| Find the earliest position such that the character at that position is the provided character. | |
| ARENE_NODISCARD constexpr auto | find_first_of (detail::character chr, size_type pos) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is the provided character. | |
| ARENE_NODISCARD constexpr auto | find_first_of (detail::raw_c_string str) const noexcept -> size_type |
| Find the earliest position such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_of (detail::raw_c_string str, size_type pos) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_of (detail::raw_c_string str, size_type pos, size_type count) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_of (string_view str) const noexcept -> size_type |
| Find the earliest position such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_first_of (string_view str, size_type pos) const noexcept -> size_type |
| Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (detail::character chr) const noexcept -> size_type |
| Find the latest position such that the character at that position is not the provided character. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (detail::character chr, size_type pos) const noexcept -> size_type |
| Find the latest position from the provided start position backwards such that the character at that position is not the provided character. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (detail::raw_c_string str) const noexcept -> size_type |
| Find the latest position such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (detail::raw_c_string str, size_type pos) const noexcept -> size_type |
| Find the latest position from the provided start position backwards such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (detail::raw_c_string str, size_type pos, size_type count) const noexcept -> size_type |
| Find the latest position from the provided start position backwards such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (string_view str) const noexcept -> size_type |
| Find the latest position such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_not_of (string_view str, size_type pos) const noexcept -> size_type |
| Find the latest position from the provided start position backwards such that the character at that position is not one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_of (detail::character chr) const noexcept -> size_type |
| Find the latest position such that the character at that position is the provided character. | |
| ARENE_NODISCARD constexpr auto | find_last_of (detail::character chr, size_type pos) const noexcept -> size_type |
| Find the latest position from the provided start position backwards such that the character at that position is the provided character. | |
| ARENE_NODISCARD constexpr auto | find_last_of (detail::raw_c_string str) const noexcept -> size_type |
| Find the last position such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_of (detail::raw_c_string str, size_type pos) const noexcept -> size_type |
| Find the last position from the provided start position backwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_of (detail::raw_c_string str, size_type pos, size_type count) const noexcept -> size_type |
| Find the latest position from the provided start position backwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_of (string_view str) const noexcept -> size_type |
| Find the last position such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | find_last_of (string_view str, size_type pos) const noexcept -> size_type |
| Find the last position from the provided start position backwards such that the character at that position is one of those in the provided string. | |
| ARENE_NODISCARD constexpr auto | front () const noexcept -> detail::character const & |
| Get the first character in the string. | |
| ARENE_NODISCARD constexpr auto | front () noexcept -> detail::character & |
| Get the first character in the string. | |
| constexpr auto | insert (const_iterator pos, detail::character chr) noexcept -> iterator |
Insert the specified character starting at position pos. | |
| template<typename InputIterator, constraints< std::enable_if_t< base::is_input_iterator_v< InputIterator > > > = nullptr> | |
| constexpr auto | insert (const_iterator pos, InputIterator first, InputIterator last) noexcept(denotes_nothrow_iterable_range_v< InputIterator >) -> iterator |
| Insert a series of characters from an iterator range into the string at the specified position. | |
| constexpr auto | insert (const_iterator pos, size_type count, detail::character chr) noexcept -> iterator |
Insert count copies of a character into the string at the specified position. | |
| constexpr auto | insert (const_iterator pos, std::initializer_list< detail::character > chars) noexcept -> iterator |
| Insert a series of characters into the string at the specified position. | |
| constexpr auto | insert (size_type pos, detail::raw_c_string str, size_type count) noexcept -> inline_string & |
Insert the string of count characters starting at str at pos. | |
| constexpr auto | insert (size_type pos, size_type count, detail::character chr) noexcept -> inline_string & |
Insert count copies of the specified character starting at position pos. | |
| constexpr auto | insert (size_type pos, string_view str) noexcept -> inline_string & |
| Insert the supplied string at the specified position. | |
| constexpr auto | insert (size_type pos1, string_view str, size_type pos2) noexcept -> inline_string & |
Insert the substring of the supplied string starting from pos2 at pos1. | |
| constexpr auto | insert (size_type pos1, string_view str, size_type pos2, size_type length2) noexcept -> inline_string & |
Insert the substring of the supplied string of max length length2 starting from pos2 at pos1. | |
| ARENE_NODISCARD constexpr | operator null_terminated_string_view () const noexcept |
| Convert to null terminated string view. | |
| ARENE_NODISCARD constexpr | operator string_view () const noexcept |
| Convert to string view. | |
| constexpr auto | operator+= (detail::character rhs) noexcept -> inline_string & |
| Append a character to the current string. | |
| constexpr auto | operator+= (std::initializer_list< detail::character > rhs) noexcept -> inline_string & |
| Append a series of characters from an initializer list to the string. | |
| constexpr auto | operator+= (string_view rhs) noexcept -> inline_string & |
| Append a string to the current string. | |
| constexpr auto | operator= (detail::character chr) noexcept -> inline_string & |
| Assign from a single character. | |
| constexpr auto | operator= (detail::raw_c_string str) noexcept -> inline_string & |
| Assign from a nul-terminated string. | |
| constexpr auto | operator= (inline_string &&) -> inline_string &=default |
| Default move assignment. | |
| constexpr auto | operator= (inline_string const &) -> inline_string &=default |
| Default copy assignment. | |
| template<std::size_t OtherMaxLength> | |
| constexpr auto | operator= (inline_string< OtherMaxLength > const &other) noexcept -> inline_string & |
| Assign from another string. | |
| constexpr auto | operator= (std::initializer_list< detail::character > str) noexcept -> inline_string & |
| Assign from an initializer list. | |
| constexpr auto | operator= (string_view str) noexcept -> inline_string & |
| Assign from a string_view. | |
| ARENE_NODISCARD constexpr auto | operator[] (size_type index) const noexcept -> detail::character const & |
Retrieve the index -th character in the string. | |
| ARENE_NODISCARD constexpr auto | operator[] (size_type index) noexcept -> detail::character & |
Retrieve the index -th character in the string. | |
| constexpr void | pop_back () noexcept |
| Remove the last character. | |
| constexpr void | push_back (detail::character rhs) noexcept |
| Append a character to the current string. | |
| ARENE_NODISCARD auto | rbegin () const noexcept -> const_reverse_iterator |
| Return an iterator to the start of the reversed string. | |
| ARENE_NODISCARD constexpr auto | rbegin () noexcept -> reverse_iterator |
| Return an iterator to the start of the reversed string. | |
| ARENE_NODISCARD auto | rend () const noexcept -> const_reverse_iterator |
| Return an iterator to the end of the reversed string. | |
| ARENE_NODISCARD constexpr auto | rend () noexcept -> reverse_iterator |
| Return an iterator to the end of the reversed string. | |
| constexpr auto | replace (const_iterator first, const_iterator last, detail::raw_c_string str, size_type count) noexcept -> inline_string & |
| Replace a substring with a c-string. | |
| template<typename InputIterator, constraints< std::enable_if_t< base::is_input_iterator_v< InputIterator > >, std::enable_if_t<!base::is_random_access_iterator_v< InputIterator > > > = nullptr> | |
| constexpr auto | replace (const_iterator first, const_iterator last, InputIterator first2, InputIterator last2) noexcept(denotes_nothrow_iterable_range_v< InputIterator >) -> inline_string & |
| Replace a substring with another substring. | |
| template<typename RandomAccessIterator, constraints< std::enable_if_t< base::is_random_access_iterator_v< RandomAccessIterator > > > = nullptr> | |
| constexpr auto | replace (const_iterator first, const_iterator last, RandomAccessIterator first2, RandomAccessIterator last2) noexcept(denotes_nothrow_iterable_range_v< RandomAccessIterator >) -> inline_string & |
| Replace a substring with another substring. | |
| constexpr auto | replace (const_iterator first, const_iterator last, size_type count, detail::character chr) noexcept -> inline_string & |
| Replace a substring with repeated copies of a character. | |
| constexpr auto | replace (const_iterator first, const_iterator last, std::initializer_list< detail::character > chars) noexcept -> inline_string & |
| Replace a substring with a sequence of characters. | |
| constexpr auto | replace (const_iterator first, const_iterator last, string_view str) noexcept -> inline_string & |
| Replace a substring with another string. | |
| constexpr auto | replace (const_iterator first, const_iterator last, string_view str, size_type pos) noexcept -> inline_string & |
| Replace a substring with another substring. | |
| constexpr auto | replace (const_iterator first, const_iterator last, string_view str, size_type pos, size_type count) noexcept -> inline_string & |
| Replace a substring with another substring. | |
| constexpr auto | replace (size_type pos, size_type count, detail::raw_c_string str, size_type count2) noexcept -> inline_string & |
| Replace a substring with a c-string. | |
| constexpr auto | replace (size_type pos, size_type count, size_type count2, detail::character chr) noexcept -> inline_string & |
| Replace a substring with repeated copies of a given character. | |
| constexpr auto | replace (size_type pos, size_type count, string_view str) noexcept -> inline_string & |
| Replace a substring with another string. | |
| constexpr auto | replace (size_type pos, size_type count, string_view str, size_type pos2) noexcept -> inline_string & |
| Replace a substring with another substring. | |
| constexpr auto | replace (size_type pos, size_type count, string_view str, size_type pos2, size_type count2) noexcept -> inline_string & |
| Replace a substring with another substring. | |
| constexpr void | resize (size_type new_size, detail::character new_char='\0') noexcept |
Resize the string. If the new size is larger than the old size, appending copies of new_char to make the string the required length. | |
| ARENE_NODISCARD constexpr auto | rfind (detail::character chr) const noexcept -> size_type |
| Find the latest position of the specified character within the string. | |
| ARENE_NODISCARD constexpr auto | rfind (detail::character chr, size_type pos) const noexcept -> size_type |
| Find the latest position of the specified character within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | rfind (detail::raw_c_string str) const noexcept -> size_type |
| Find the latest position of the given substring within the string. | |
| ARENE_NODISCARD constexpr auto | rfind (detail::raw_c_string str, size_type pos) const noexcept -> size_type |
| Find the latest position of the given substring within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | rfind (detail::raw_c_string str, size_type pos, size_type count) const noexcept -> size_type |
Find the latest position of the n character string starting at str within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | rfind (string_view str) const noexcept -> size_type |
| Find the latest position of the given substring within the string. | |
| ARENE_NODISCARD constexpr auto | rfind (string_view str, size_type pos) const noexcept -> size_type |
| Find the latest position of the given substring within the string, starting at the specified position. | |
| ARENE_NODISCARD constexpr auto | starts_with (detail::character chr) const noexcept -> bool |
| Check if the string starts with a character. | |
| ARENE_NODISCARD constexpr auto | starts_with (string_view str) const noexcept -> bool |
| Check if the string starts with another string. | |
| ARENE_NODISCARD constexpr auto | substr () const noexcept -> inline_string |
| Produce a copy of the string. | |
| ARENE_NODISCARD constexpr auto | substr (size_type pos) const noexcept -> inline_string |
| Produce substring of the string starting at an offset. | |
| ARENE_NODISCARD constexpr auto | substr (size_type pos, size_type n) const noexcept -> inline_string |
| Produce a substring of the string with an offset and length. | |
Static Public Member Functions | |
| static constexpr auto | capacity () -> std::size_t |
| The maximum length of the string. | |
| template<std::size_t OtherMaxLength> | |
| static ARENE_NODISCARD constexpr auto | fast_inequality_check (inline_string const &lhs, inline_string< OtherMaxLength > const &rhs) noexcept -> inequality_heuristic |
| Determine if two strings are definitely not equal. | |
| static ARENE_NODISCARD constexpr auto | fast_inequality_check (inline_string const &lhs, string_view rhs) noexcept -> inequality_heuristic |
| Determine if two strings are definitely not equal. | |
| static constexpr auto | max_size () -> std::size_t |
| The maximum length of the string. | |
| static ARENE_NODISCARD constexpr auto | three_way_compare (inline_string const &lhs, detail::raw_c_string rhs) noexcept -> strong_ordering |
| Compare two strings for lexicographical ordering. | |
| template<std::size_t OtherMaxLength> | |
| static ARENE_NODISCARD constexpr auto | three_way_compare (inline_string const &lhs, inline_string< OtherMaxLength > const &rhs) noexcept -> strong_ordering |
| Compare two strings for lexicographical ordering. | |
| static ARENE_NODISCARD constexpr auto | three_way_compare (inline_string const &lhs, null_terminated_string_view rhs) noexcept -> strong_ordering |
| Compare two strings for lexicographical ordering. | |
| static ARENE_NODISCARD constexpr auto | three_way_compare (inline_string const &lhs, string_view rhs) noexcept -> strong_ordering |
| Compare two strings for lexicographical ordering. | |
| template<size_type OtherMaxSize, constraints< std::enable_if_t<(OtherMaxSize<=MaxSize)> > = nullptr> | |
| static constexpr auto | try_construct (inline_string< OtherMaxSize > const &str) noexcept -> optional< inline_string > |
Attempt to construct from another inline_string with a capacity that is less than or equal to the capacity of this. | |
| template<size_type OtherMaxSize, constraints< std::enable_if_t<(OtherMaxSize > MaxSize)>> | |
| static constexpr auto | try_construct (inline_string< OtherMaxSize > const &str) noexcept -> optional< inline_string > |
Attempt to construct from another inline_string with a larger capacity. | |
| template<typename InputIterator, constraints< std::enable_if_t< is_input_iterator_v< InputIterator > > > = nullptr> | |
| static constexpr auto | try_construct (InputIterator first, InputIterator last) noexcept(denotes_nothrow_iterable_range_v< InputIterator >) -> optional< inline_string > |
| Attempt to construct from a sequence of characters. | |
| static constexpr auto | try_construct (string_view const str) noexcept -> optional< inline_string > |
Attempt to construct from a string_view . | |
Static Public Attributes | |
| static constexpr size_type | npos {string_view::npos} |
| Special marker for element not in string. | |
Friends | |
| template<std::size_t OtherMaxLength> | |
| ARENE_NODISCARD friend constexpr auto | operator+ (inline_string const &lhs, inline_string< OtherMaxLength > const &rhs) noexcept -> inline_string< MaxSize+OtherMaxLength > |
| Concatenate two strings. | |
| ARENE_NODISCARD friend constexpr auto | operator+ (inline_string const &lhs, string_view const rhs) noexcept -> inline_string |
| Concatenate two strings. | |
| ARENE_NODISCARD friend constexpr auto | operator+ (string_view const lhs, inline_string const &rhs) noexcept -> inline_string |
| Concatenate two strings. | |
A string type with a fixed maximum capacity, where the data is stored internally without allocations.
| MaxSize | the maximum capacity of the string, not including the null terminator. Must be non-zero, and less than std::numeric_limits<difference_type>::max() |
|
default |
Use the default destructor.
|
constexprdefaultnoexcept |
Default-construct an empty string.
|
constexprdefault |
Default copy construction.
|
constexprdefault |
Default move construction.
|
inlineexplicitconstexprnoexcept |
Construct from the provided NUL-terminated string.
| str | The source string |
str must be less than MaxLength , else ARENE_PRECONDITION violation. str must point to a NUL-terminated string, else behavior is undefined. size() is the length of str str
|
inlineconstexprnoexcept |
Construct from the source string literal.
| N | the size of the source character array. Must be <=(MaxLength+1) |
| str | The string to copy from |
str must have a NUL terminator somewhere in it str
|
inlineexplicitconstexprnoexcept |
Construct from the provided string_view.
| str | The source string |
str must be less than MaxLength , else ARENE_PRECONDITION violation. str must point to a NUL-terminated string, else behavior is undefined. size() is the length of str str
|
inlineconstexprnoexcept |
Implicit conversion from another inline_string which can provably fit in this inline_string.
| OtherMaxLength | The length of the other string. Must be <= MaxLength |
| other | The other string |
size()==other.size() other
|
inlineexplicitconstexprnoexcept |
Explicit conversion from another inline_string which cannot provably fit in this inline_string.
| OtherMaxLength | The length of the other string |
| other | The other string |
other.size() is less than or equal to MaxLength else ARENE_PRECONDITION violation size()==other.size() other
|
inlineconstexprnoexcept |
Construct a pre-filled inline_string of a given length.
| len | The length of the constructed string. |
| chr | The character to fill the string. |
len must be less than or equal to MaxLength , else ARENE_PRECONDITION violation. size() is equal to len . chr .
|
inlineexplicitconstexprnoexcept |
Construction from a sequence of characters represented as a pair of iterators.
| InputIterator | The type of the iterators |
| first | The start of the iterator range |
| last | The end of the iterator range |
std::distance(first,last)<=MaxSize else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Append a character to the current string.
| rhs | The character to append |
*this size()+1<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Append a string specified as pointer and length to the current string.
| rhs | The start if the string to append |
| count | The number of characters in the string to append |
*this size()+count<=max_size() else ARENE_PRECONDITION violation. size() is increased by count count characters in the string are the count characters from rhs .
|
inlineconstexprnoexcept |
Append the specified number of copies of a character to the string.
| count | The number of characters to append |
| chr | The character to append |
*this size()+count<=max_size() else ARENE_PRECONDITION violation. size() is increased by count count characters in the string are chr .
|
inlineconstexprnoexcept |
Append a series of characters from an initializer list to the string.
| rhs | The characters to append |
*this size()+rhs.size()<=max_size() else ARENE_PRECONDITION violation. size() is increased by rhs.size() rhs .
|
inlineconstexprnoexcept |
Append a string to the current string.
| rhs | The string to append |
*this size()+rhs.size()<=max_size() else ARENE_PRECONDITION violation. size() is increased by rhs.size() rhs .
|
inlineconstexprnoexcept |
Append a substring of a string to the current string.
| rhs | The string containing the substring to append |
| pos | The offset into rhs of the substring to append |
*this size()+rhs.substr(pos).size()<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Append a substring of a string to the current string.
| rhs | The string containing the substring to append |
| pos | The offset into rhs of the substring to append |
| count | The maximum length of the substring to append |
*this size()+rhs.substr(pos,count).size()<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Assign from a single character.
| chr | The source character |
*this size() is 1 chr
|
inlineconstexprnoexcept |
Assign from a string specified as pointer and length to the current string.
| str | The start if the string to assign |
| count | The number of characters in the string to assign |
*this nullptr , else ARENE_PRECONDITION violation. str, else behavior is undefined. str must be less than MaxLength , else ARENE_PRECONDITION violation. size() is the length of str str
|
inlineconstexprnoexcept |
Assign repeated copies of a single character.
| count | The number of times to repeat the character |
| chr | The source character |
*this count<=MaxLength , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Assign from an initializer list of characters.
| str | The source initializer list |
*this str must be less than MaxLength , else ARENE_PRECONDITION violation. size() is the length of str str
|
inlineconstexprnoexcept |
Assign from a string_view.
| str | The source string |
*this str must be less than MaxLength , else ARENE_PRECONDITION violation. size() is the length of str str
|
inlineconstexprnoexcept |
Assign from a string_view.
| str | The source string |
| pos | The offset in str of the substring to assign |
*this str.substr(pos).size() must be less than MaxLength , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Assign from a substring of a string_view starting at the specified position, with the specified max length.
| str | The source string |
| pos | The offset in str of the substring to assign |
| count | The maximum number of characters in the substring |
*this str.substr(pos,count).size() must be less than MaxLength , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Get the last character in the string.
size()>0 , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Get the last character in the string.
size()>0 , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Iterator to the first position in the string.
end() otherwise
|
inlineconstexprnoexcept |
Iterator to the first position in the string.
end() otherwise
|
inlineconstexprnoexcept |
Return a pointer to the NUL-terminated string held in *this.
*this
|
inlinestaticconstexpr |
The maximum length of the string.
MaxSize
|
inlineconstexprnoexcept |
Iterator to the first position in the string.
end() otherwise
|
inlineconstexprnoexcept |
Return an iterator to one-past-the-last position in the string.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Compare a substring against another string, to see if it is less than, equal to or greater than the other.
| pos | The start of the substring to compare |
| count | The length of the substring to compare |
| other | The other string |
substr(pos,n).compare(other)
|
inlineconstexprnoexcept |
Compare a substring against a substring of another string, to see if it is less than, equal to or greater than the other.
| pos | The start of the substring to compare |
| count | The length of the substring to compare |
| other | The other string |
| pos2 | The start of the substring in the other string |
compare(pos,n,other.substr(pos2))
|
inlineconstexprnoexcept |
Compare a substring against another string, to see if it is less than, equal to or greater than the other.
| pos | The start of the substring to compare |
| length1 | The length of the substring to compare |
| other | The start of the other string |
| length2 | The length of the other string |
compare(pos,n,string_view{other,length2})
|
inlineconstexprnoexcept |
Compare a substring against a substring of another string, to see if it is less than, equal to or greater than the other.
| pos | The start of the substring to compare |
| length1 | The length of the substring to compare |
| other | The other string |
| pos2 | The start of the substring in the other string |
| length2 | The length of the substring in the other string |
compare(pos,n,other.substr(pos2,length2))
|
inlineconstexprnoexcept |
Compare against another string, to see if it is less than, equal to or greater than the other.
| other | The other string |
-1 if *this is less than other, 0 if they are equal, and 1 if *this is greater than other
|
inlineconstexpr |
Copy the string into the specified buffer up to the specified maximum length.
| str | A pointer to the target buffer |
| count | The maximum number of characters to copy |
str+n must be valid , else behavior is undefined.
|
inlineconstexpr |
Copy the substring starting at the specified position into the specified buffer up to the specified maximum length.
| str | A pointer to the target buffer |
| count | The maximum number of characters to copy |
| pos | The starting position to copy from. If >size() , no characters are copied. |
str[min(count,size()-pos)] must be valid , else behavior is undefined.
|
inlinenoexcept |
Return an iterator to the start of the reversed string.
const_reverse_iterator(end())
|
inlinenoexcept |
Return an iterator to the end of the reversed string.
const_reverse_iterator(begin())
|
inlineconstexprnoexcept |
Return a pointer to the NUL-terminated string held in *this.
*this
|
inlineconstexprnoexcept |
Return a pointer to the NUL-terminated string held in *this.
*this
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Return an iterator to one-past-the-last position in the string.
|
inlineconstexprnoexcept |
The one-past-the-last position in the string.
|
inlineconstexprnoexcept |
Check if the string ends with a character.
| chr | The character to check |
true if the string ends with the character, false otherwise
|
inlineconstexprnoexcept |
Check if the string ends with another string.
| str | The string to check |
true if the string ends with the string, false otherwise
|
inlineconstexprnoexcept |
Erase all the characters in the string.
*this
|
inlineconstexprnoexcept |
Erase the characters in the specified range.
first and last must form a valid iterator range into the current string | first | The start of the range |
| last | The end of the range |
end() if there is no such character
|
inlineconstexprnoexcept |
Erase the character at the specified range.
pos must be a valid iterator into the current string | pos | The iterator referring to the character to erase |
end() if there is no such character
|
inlineconstexpr |
Erase characters from the string starting at the specified position to the end of the string.
| pos | The position of the first character to remove. If >=size() is a noop. |
*this
|
inlineconstexprnoexcept |
Erase the specified number of characters in the string starting at the specified position.
| pos | The position of the characters to remove. If pos>=size() this is a noop. |
| count | The maximum number of characters to remove. |
*this
|
inlinestaticconstexprnoexcept |
Determine if two strings are definitely not equal.
| OtherMaxLength | The max length of the second string |
| lhs | The first string |
| rhs | The second string |
lhs.size()!=rhs.size() . lhs.size()==rhs.size() .
|
inlinestaticconstexprnoexcept |
Determine if two strings are definitely not equal.
| lhs | The first string |
| rhs | The second string |
lhs.size()!=rhs.size() . lhs.size()==rhs.size() .
|
inlineconstexprnoexcept |
Find the earliest position of the specified character within the string.
| chr | The character to search for |
npos if not found
|
inlineconstexprnoexcept |
Find the earliest position of the specified character within the string, starting at the specified position.
| chr | The character to search for |
| pos | The lowest position to search from |
npos if not found
|
inlineconstexprnoexcept |
Find the earliest position of the given substring within the string.
| str | The substring to search for |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the earliest position of the given substring within the string, starting at the specified position.
| str | The substring to search for |
| pos | The lowest position to search from |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the earliest position of the n character string starting at str within the string, starting at the specified position.
| str | The start of the string to search for |
| pos | The lowest position to search from |
| count | The length of the string to search for |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the earliest position of the given substring within the string, starting at the specified position.
| str | The substring to search for. |
| pos | The lowest position to search from. Defaults to 0. |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the earliest position such that the character at that position is the provided character.
| chr | The character to find |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is not the provided character.
| chr | The character to find |
| pos | The start position |
chr after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
| count | The number of characters in str |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position such that the character at that position is the provided character.
| chr | The character to find |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is the provided character.
| chr | The character to find |
| pos | The start position |
chr after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
| count | The number of characters in str |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the earliest position from the provided start position onwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position such that the character at that position is not the provided character.
| chr | The character to find |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position from the provided start position backwards such that the character at that position is not the provided character.
| chr | The character to find |
| pos | The start position |
chr at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position from the provided start position backwards such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position from the provided start position backwards such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
| count | The number of characters in str |
str at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position from the provided start position backwards such that the character at that position is not one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position such that the character at that position is the provided character.
| chr | The character to find |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position from the provided start position backwards such that the character at that position is the provided character.
| chr | The character to find |
| pos | The start position |
chr at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the last position such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the last position from the provided start position backwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the latest position from the provided start position backwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
| count | The number of characters in str |
n characters of str at or before pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the last position such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Find the last position from the provided start position backwards such that the character at that position is one of those in the provided string.
| str | The list of characters to find |
| pos | The start position |
str before or at pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Get the first character in the string.
size()>0 , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Get the first character in the string.
size()>0 , else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Insert the specified character starting at position pos.
| pos | The insertion position |
| chr | The character to insert |
pos must be a valid iterator into *this else behavior is undefined. size()+1<max_size() , else ARENE_PRECONDITION violation. size() is increased by 1 . chr is inserted at pos
|
inlineconstexprnoexcept |
Insert a series of characters from an iterator range into the string at the specified position.
| InputIterator | The type of the input iterator. |
| pos | An iterator representing the position to insert |
| first | The start of the input range |
| last | The end of the input range |
size()+std::distance(first,last)<=max_size() else ARENE_PRECONDITION violation. pos must be a valid iterator into *this InputIterator must be an input iterator first and last must form a valid iterator range
|
inlineconstexprnoexcept |
Insert count copies of a character into the string at the specified position.
| pos | An iterator representing the position to insert |
| count | The number of times to insert the character |
| chr | The character to insert |
pos must be a valid iterator into *this else behavior is undefined. pos+count<max_size() , else ARENE_PRECONDITION violation. size() is increased by count . count copies of chr are inserted beginning at pos
|
inlineconstexprnoexcept |
Insert a series of characters into the string at the specified position.
| pos | An iterator representing the position to insert |
| chars | The characters to insert |
pos must be a valid iterator into *this else behavior is undefined. pos+chars.size()<max_size() , else ARENE_PRECONDITION violation. size() is increased by chars.size() . chars are inserted beginning at pos
|
inlineconstexprnoexcept |
Insert the string of count characters starting at str at pos.
| pos | The insertion position |
| str | The start of the string to insert |
| count | The length of the string to insert |
*this pos<=size() else ARENE_PRECONDITION violation. pos+count<max_size() , else ARENE_PRECONDITION violation. str+count must be in the valid range of str else behavior is undefined. size() is increased by count . str is inserted at pos
|
inlineconstexprnoexcept |
Insert count copies of the specified character starting at position pos.
| pos | The insertion position |
| count | The number of times to insert the character |
| chr | The character to insert |
*this pos<=size() else ARENE_PRECONDITION violation. pos+count<max_size() , else ARENE_PRECONDITION violation. size() is increased by count . count copies of chr are inserted beginning at pos
|
inlineconstexprnoexcept |
Insert the supplied string at the specified position.
| pos | The insertion position |
| str | The string to insert |
*this pos<=size() else ARENE_PRECONDITION violation. pos+str.length()<max_size() , else ARENE_PRECONDITION violation. size() is increased by str.size() . str is inserted at pos
|
inlineconstexprnoexcept |
Insert the substring of the supplied string starting from pos2 at pos1.
| pos1 | The insertion position |
| str | The string holding the substring to insert |
| pos2 | The position of the start of the substring to insert. If >=str.size(), this is a no-op. |
*this pos1<=size() else ARENE_PRECONDITION violation. pos1+(str.length()-pos2)<max_size() , else ARENE_PRECONDITION violation. size() is increased by (str.size()-pos2) . [str.begin()+pos2,str.end()) is inserted at pos1
|
inlineconstexprnoexcept |
Insert the substring of the supplied string of max length length2 starting from pos2 at pos1.
| pos1 | The insertion position |
| str | The string holding the substring to insert |
| pos2 | The position of the start of the substring to insert. If >=str.size(), this is a no-op. |
| length2 | The maximum length of the substring to insert |
*this pos1<=size() else ARENE_PRECONDITION violation. pos1+min(length2,str.size()-pos2)<max_size() , else ARENE_PRECONDITION violation. size() is increased by min(length2,str.size()-pos2) . [str.begin()+pos2,str.begin()+min(length2,str.size()-pos2)) is inserted at pos1
|
inlinestaticconstexpr |
The maximum length of the string.
MaxSize
|
inlineconstexprnoexcept |
Convert to null terminated string view.
Implicit conversion to null_terminated_string_view supports the use of null_terminated_string_view as a vocabulary type for accepting string parameters.
*this
|
inlineconstexprnoexcept |
Convert to string view.
Implicit conversion to string_view supports the use of string_view as a vocabulary type for accepting string parameters.
*this
|
inlineconstexprnoexcept |
Append a character to the current string.
| rhs | The character to append |
*this size()+1<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Append a series of characters from an initializer list to the string.
| rhs | The characters to append |
*this size()+rhs.size()<=max_size() else ARENE_PRECONDITION violation. size() is increased by rhs.size() rhs .
|
inlineconstexprnoexcept |
Append a string to the current string.
| rhs | The string to append |
*this size()+rhs.size()<=max_size() else ARENE_PRECONDITION violation. size() is increased by rhs.size() rhs .
|
inlineconstexprnoexcept |
Assign from a single character.
| chr | The source character |
*this size() is 1 chr
|
inlineconstexprnoexcept |
Assign from a nul-terminated string.
| str | The source string |
*this str must be less than MaxLength , else ARENE_PRECONDITION violation. str must point to a NUL-terminated string, else behavior is undefined. size() is the length of str str
|
constexprdefault |
Default move assignment.
*this
|
constexprdefault |
Default copy assignment.
*this
|
inlineconstexprnoexcept |
Assign from another string.
| OtherMaxLength | the max length of the other string |
| other | The source string |
*this other.size() is less than or equal to MaxLength else ARENE_PRECONDITION violation size()==other.size() other
|
inlineconstexprnoexcept |
Assign from an initializer list.
| str | The source string |
*this str must be less than MaxLength , else ARENE_PRECONDITION violation. size() is the length of str str
|
inlineconstexprnoexcept |
Assign from a string_view.
| str | The source string |
*this str must be less than MaxLength , else ARENE_PRECONDITION violation. size() is the length of str str
|
inlineconstexprnoexcept |
Retrieve the index -th character in the string.
| index | The index of the character to retrieve |
index<=size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Remove the last character.
size() is reduced by 1. ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Append a character to the current string.
| rhs | The character to append |
size()+1<=max_size() else ARENE_PRECONDITION violation.
|
inlinenoexcept |
Return an iterator to the start of the reversed string.
const_reverse_iterator(end())
|
inlineconstexprnoexcept |
Return an iterator to the start of the reversed string.
reverse_iterator(end())
|
inlinenoexcept |
Return an iterator to the end of the reversed string.
const_reverse_iterator(begin())
|
inlineconstexprnoexcept |
Return an iterator to the end of the reversed string.
reverse_iterator(begin())
|
inlineconstexprnoexcept |
Replace a substring with a c-string.
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| str | The string to replace the substring with |
| count | The count into str to cap the replacement. |
*this [first,last) are replaced by the characters in the range [str+pos,str+count) . std::distance(first,last)<count , then the remaining characters from str are inserted at last , and size() will increase by the difference. std::distance(first,last)>count, then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. str+count must be in the valid range of str else behavior is undefined. dist=std::distance(first,last) ; if dist<count, then size()+(count-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another substring.
| InputIterator | The iterator type |
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| first2 | The start of the substring to replace the substring with |
| last2 | The end of the substring to replace the substring with. |
*this [first,last) are replaced by the characters in the range [first2,last2) . std::distance(first,last)<std::distance(first2,last2) , then the remaining characters from [first2,last2] are inserted at last , and size() will increase by the difference. std::distance(first,last)>std::distance(first2,last2), then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) and length=std::distance(first,last) ; if dist<length, then size()+(length-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another substring.
| RandomAccessIterator | The iterator type |
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| first2 | The start of the substring to replace the substring with |
| last2 | The end of the substring to replace the substring with. |
*this [first,last) are replaced by the characters in the range [first2,last2) . std::distance(first,last)<std::distance(first2,last2) , then the remaining characters from [first2,last2] are inserted at last , and size() will increase by the difference. std::distance(first,last)>std::distance(first2,last2), then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) and length=std::distance(first,last) ; if dist<length, then size()+(length-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with repeated copies of a character.
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| count | The count into str to cap the replacement. |
| chr | The character to fill with. |
*this [first,last) are replaced by count repeated copies of chr std::distance(first,last)<count , then the remaining characters are inserted at last , and size() will increase by the difference. std::distance(first,last)>count, then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) ; if dist<count, then size()+(count-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with a sequence of characters.
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| chars | the sequence of characters to replace |
*this [first,last) are replaced by the characters from chars std::distance(first,last)<chars.size() , then the remaining characters from chars are inserted at last , and size() will increase by the difference. std::distance(first,last)>chars.size(), then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) ; if dist<chars.size(), then size()+(str.size()-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another string.
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| str | The string to replace the substring with |
*this [first,last) are replaced by the characters in str . std::distance(first,last)<str.size() , then the remaining characters from str are inserted at last , and size() will increase by the difference. std::distance(first,last)>str.size(), then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) ; if dist<str.size(), then size()+(str.size()-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another substring.
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| str | The string to replace the substring with |
| pos | The offset into str to start the replacement string. If pos>str.size() , this is a no-op. |
*this [first,last) are replaced by the characters in the range [str.begin()+pos,str.end()) . std::distance(first,last)<(str.size()-pos) , then the remaining characters from str are inserted at last , and size() will increase by the difference. std::distance(first,last)>(str.size()-pos), then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) ; if dist<(str.size()-pos), then size()+(str.size()-pos-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another substring.
| first | The start of the substring to replace. |
| last | The end of the substring to replace |
| str | The string to replace the substring with |
| pos | The offset into str to start the replacement string. If pos>str.size() , this is a no-op. |
| count | The count into str to cap the replacement. |
*this [first,last) are replaced by the characters in the range [str.begin()+pos,str.begin()+std::min(str.size(),count)) . std::distance(first,last)<std::min(str.size()-pos,count) , then the remaining characters from str are inserted at last , and size() will increase by the difference. std::distance(first,last)>std::min(str.size()-pos,count), then the remain characters from [first,last) are erased and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. dist=std::distance(first,last) and length=std::min(str.size()-pos,count) ; if dist<length, then size()+(length-dist)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with a c-string.
| pos | The start of the substring to replace. |
| count | The length of the substring to replace |
| str | The string to replace the substring with |
| count2 | The count into str to cap the replacement. |
*this [pos,std::min(pos+count,size())) are replaced by the characters in the range [str,str+count) . count<count2 , then the remaining characters from str are inserted at the position equivalent to pos+count . count<count2 , then size() will increase by the difference. pos<=size() else ARENE_PRECONDITION violation. str+count must be in the valid range of str else behavior is undefined. count<count2, then size()+(count2-count)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with repeated copies of a given character.
| pos | The start of the substring to replace. |
| count | The length of the substring to replace |
| count2 | The number of characters to fill. |
| chr | The character to fill with. |
*this [pos,std::min(pos+count,size())) are replaced by count2 copies of chr count<count2 , then the remaining copies of chr are inserted at the position equivalent to pos+count , and size() will increase by the difference count>count2 , then the remaining characters in the replacement range will be erased, and size() will decrease by the difference. pos<=size() else ARENE_PRECONDITION violation. count<count2, then size()+(count2-count)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another string.
| pos | The start of the substring to replace. |
| count | The length of the substring to replace |
| str | The string to replace the substring with |
*this [pos,std::min(pos+count,size())) are replaced by the characters in str . count<str.size() , then the remaining characters from str are inserted at the position equivalent to pos+count . count<str.size(), then size() will increase by the difference. pos<=size() else ARENE_PRECONDITION violation. count<str.size(), then size()+(str.size()-count)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another substring.
| pos | The start of the substring to replace. |
| count | The length of the substring to replace |
| str | The string to replace the substring with |
| pos2 | The offset into str to start the replacement string. If pos2>str.size() , this is a no-op. |
*this [pos,std::min(pos+count,size())) are replaced by the characters in the range [pos2,str.size()) . count<(str.size()-pos2) , then the remaining characters from str are inserted at the position equivalent to pos+count . count<(str.size()-pos2) , then size() will increase by the difference. pos<=size() else ARENE_PRECONDITION violation. count<(str.size()-pos2), then size()+(str.size()-pos2-count)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Replace a substring with another substring.
| pos | The start of the substring to replace. |
| count | The length of the substring to replace |
| str | The string to replace the substring with |
| pos2 | The offset into str to start the replacement string. If pos2>str.size() , this is a no-op. |
| count2 | The count into str to cap the replacement. |
*this [pos,std::min(pos+count,size())) are replaced by the characters in the range [pos2,std::min(count2,str.size())) . count<(std::min(count2,str.size())-pos2) , then the remaining characters from str are inserted at the position equivalent to pos+count . count<(std::min(count2,str.size())-pos2) , then size() will increase by the difference. pos<=size() else ARENE_PRECONDITION violation. count<(std::min(count2,str.size())-pos2), then size()+(str.size()-pos2-count)<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Resize the string. If the new size is larger than the old size, appending copies of new_char to make the string the required length.
| new_size | The new size of the string |
| new_char | The character to append if extending the string. Defaults to '\0' . |
new_size<=max_size() else ARENE_PRECONDITION violation.
|
inlineconstexprnoexcept |
Find the latest position of the specified character within the string.
| chr | The character to search for |
npos if not found
|
inlineconstexprnoexcept |
Find the latest position of the specified character within the string, starting at the specified position.
| chr | The character to search for |
| pos | The highest position to search from |
npos if not found
|
inlineconstexprnoexcept |
Find the latest position of the given substring within the string.
| str | The substring to search for |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the latest position of the given substring within the string, starting at the specified position.
| str | The substring to search for |
| pos | The highest position to search from |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the latest position of the n character string starting at str within the string, starting at the specified position.
| str | The start of the string to search for |
| pos | The highest position to search from |
| count | The length of the string to search for |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the latest position of the given substring within the string.
| str | The substring to search for |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Find the latest position of the given substring within the string, starting at the specified position.
| str | The substring to search for |
| pos | The highest position to search from |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
Check if the string starts with a character.
| chr | The character to check |
true if the string starts with the character, false otherwise
|
inlineconstexprnoexcept |
Check if the string starts with another string.
| str | The string to check |
true if the string starts with the string, false otherwise
|
inlineconstexprnoexcept |
Produce a copy of the string.
*this
|
inlineconstexprnoexcept |
Produce substring of the string starting at an offset.
| pos | The start of the substring to return. |
[begin()+pos,end()) . If pos>=size() , returns an empty string.
|
inlineconstexprnoexcept |
Produce a substring of the string with an offset and length.
| pos | The start of the substring to return |
| n | The maximum number of characters to return |
|
inlinestaticconstexprnoexcept |
Compare two strings for lexicographical ordering.
| lhs | The first string |
| rhs | The second string |
size() and equivalent characters. lhs is lexicographically before rhs . lhs is lexicographically after rhs .
|
inlinestaticconstexprnoexcept |
Compare two strings for lexicographical ordering.
| OtherMaxLength | The max length of the other string |
| lhs | The first string |
| rhs | The second string |
size() and equivalent characters. lhs is lexicographically before rhs . lhs is lexicographically after rhs .
|
inlinestaticconstexprnoexcept |
Compare two strings for lexicographical ordering.
| lhs | The first string |
| rhs | The second string |
size() and equivalent characters. lhs is lexicographically before rhs . lhs is lexicographically after rhs .
|
inlinestaticconstexprnoexcept |
Compare two strings for lexicographical ordering.
| lhs | The first string |
| rhs | The second string |
size() and equivalent characters. lhs is lexicographically before rhs . lhs is lexicographically after rhs .
|
inlinestaticconstexprnoexcept |
Attempt to construct from another inline_string with a capacity that is less than or equal to the capacity of this.
| OtherMaxSize | The capacity of the other string |
| str | The source string. |
str.size()>MaxLength , a null optional, else an optional populated as if via inline_string{str} .
|
inlinestaticconstexprnoexcept |
Attempt to construct from another inline_string with a larger capacity.
| OtherMaxSize | The capacity of the other string |
| str | The source string. |
str.size()>MaxLength , a null optional, else an optional populated as if via inline_string{str} .
|
inlinestaticconstexprnoexcept |
Attempt to construct from a sequence of characters.
| first | An iterator referring to the start of the source string |
| last | An iterator referring to the end of the source string |
MaxLength , a null optional, else an optional populated with the elements in the range [first,last) .
|
inlinestaticconstexprnoexcept |
Attempt to construct from a string_view .
| str | The source string. |
str.size()>MaxLength , a null optional, else an optional populated as if via inline_string{str} .
|
friend |
Concatenate two strings.
| OtherMaxLength | the max length of rhs |
| lhs | The first string to concatenate |
| rhs | The second string to concatenate |
inline_string<MaxLength+OtherMaxLength> holding the concatenation of the two strings.
|
friend |
Concatenate two strings.
| lhs | The first string to concatenate |
| rhs | The second string to concatenate |
lhs.size()+rhs.size()<=lhs.max_size() else ARENE_PRECONDITION violation.
|
friend |
Concatenate two strings.
| lhs | The first string to concatenate |
| rhs | The second string to concatenate |
lhs.size()+rhs.size()<=rhs.max_size() else ARENE_PRECONDITION violation.
|
staticconstexpr |
Special marker for element not in string.