|
constexpr | basic_inplace_string ()=default |
| Default constructor.
|
|
constexpr | basic_inplace_string (basic_inplace_string &&) noexcept=default |
| Defaulted move constructor.
|
|
constexpr | basic_inplace_string (basic_inplace_string const &) noexcept=default |
| Defaulted copy constructor.
|
|
constexpr | basic_inplace_string (basic_inplace_string const &other, size_type pos) |
| Constructs the string with a substring [pos, other.size()).
|
|
constexpr | basic_inplace_string (basic_inplace_string const &other, size_type pos, size_type count) |
| Constructs the string with a substring [pos, pos+count) of other.
|
|
constexpr | basic_inplace_string (const_pointer str) noexcept |
| Character pointer constructor. Calls traits_type::length.
|
|
constexpr | basic_inplace_string (const_pointer str, size_type const len) noexcept |
| Character pointer constructor.
|
|
template<typename InputIt>
requires (detail::InputIterator<InputIt>) |
constexpr | basic_inplace_string (InputIt first, InputIt last) noexcept |
| Constructs the string with the contents of the range [ first, last). Fails silently if input length is greater then capacity.
|
|
constexpr | basic_inplace_string (nullptr_t)=delete |
|
constexpr | basic_inplace_string (size_type count, Char ch) noexcept |
| Constructs the string with count copies of character ch.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr | basic_inplace_string (StringView const &view) noexcept |
| Implicitly converts view to a string view sv, then initializes the string with the contents of sv.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr | basic_inplace_string (StringView const &view, size_type pos, size_type n) |
| Implicitly converts view to a string view sv, then initializes the string with the subrange [ pos, pos + n ) of sv.
|
|
constexpr auto | append (basic_inplace_string const &str) noexcept -> basic_inplace_string & |
| Appends string str.
|
|
constexpr auto | append (basic_inplace_string const &str, size_type pos, size_type count=npos) noexcept -> basic_inplace_string & |
| Appends a substring [ pos, pos + count ) of str.
|
|
constexpr auto | append (const_pointer s) noexcept -> basic_inplace_string & |
| Appends the null-terminated character string pointed to by s. The length of the string is determined by the first null character using.
|
|
constexpr auto | append (const_pointer str, size_type count) noexcept -> basic_inplace_string & |
| Appends characters in the range [ str, str + count ). This range can contain null characters.
|
|
template<typename InputIt>
requires (detail::InputIterator<InputIt>) |
constexpr auto | append (InputIt first, InputIt last) noexcept -> basic_inplace_string & |
| Appends characters in the range [ first , last ).
|
|
constexpr auto | append (size_type const count, Char const s) noexcept -> basic_inplace_string & |
| Appends count copies of character s.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | append (StringView const &view) -> basic_inplace_string & |
| Implicitly converts view to a string_view sv, then appends all characters from sv.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | append (StringView const &view, size_type pos, size_type count=npos) -> basic_inplace_string & |
| Implicitly converts view to a string_view sv then appends the characters from the subview [ pos, pos + count ) of sv.
|
|
constexpr auto | assign (basic_inplace_string const &str) noexcept -> basic_inplace_string & |
| Replaces the contents with a copy of str.
|
|
constexpr auto | assign (basic_inplace_string const &str, size_type pos, size_type count=npos) noexcept -> basic_inplace_string & |
| Replaces the contents with a substring [ pos, pos + count ) of str.
|
|
constexpr auto | assign (const_pointer s) noexcept -> basic_inplace_string & |
| Replaces the contents with those of null-terminated character string pointed to by s.
|
|
constexpr auto | assign (const_pointer s, size_type count) noexcept -> basic_inplace_string & |
| Replaces the contents with copies of the characters in the range [ s, s + count ). This range can contain null characters.
|
|
template<typename InputIt>
requires (detail::InputIterator<InputIt>) |
constexpr auto | assign (InputIt first, InputIt last) noexcept -> basic_inplace_string & |
| Replaces the contents with copies of the characters in the range [ first , last ).
|
|
constexpr auto | assign (size_type count, Char ch) noexcept -> basic_inplace_string & |
| Replaces the contents with count copies of character ch.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | assign (StringView const &view) noexcept -> basic_inplace_string & |
| Implicitly converts view to a string view sv, then replaces the contents with the characters from sv.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | assign (StringView const &view, size_type pos, size_type count=npos) noexcept -> basic_inplace_string & |
| Implicitly converts view to a string view sv, then replaces the contents with the characters from the subview [ pos, pos + count ) of sv.
|
|
constexpr auto | back () const noexcept -> const_reference |
| Accesses the last character.
|
|
constexpr auto | back () noexcept -> reference |
| Accesses the last character.
|
|
constexpr auto | begin () const noexcept -> const_iterator |
| Returns an const iterator to the beginning.
|
|
constexpr auto | begin () noexcept -> iterator |
| Returns an iterator to the beginning.
|
|
constexpr auto | c_str () const noexcept -> const_pointer |
| Returns a pointer to a null-terminated character array.
|
|
constexpr auto | capacity () const noexcept -> size_type |
| Returns the number of characters that can be held in allocated storage, NOT including the null terminator.
|
|
constexpr auto | cbegin () const noexcept -> const_iterator |
| Returns an const iterator to the beginning.
|
|
constexpr auto | cend () const noexcept -> const_iterator |
| Returns an const iterator to the end.
|
|
constexpr auto | clear () noexcept -> void |
| Removes all characters from the string. Sets size to 0 and overrides the buffer with zeros.
|
|
constexpr auto | compare (basic_inplace_string const &str) const noexcept -> int |
| Compares this string to str.
|
|
template<size_type OtherCapacity> |
constexpr auto | compare (basic_inplace_string< Char, OtherCapacity, traits_type > const &str) const noexcept -> int |
| Compares this string to str with other capacity.
|
|
constexpr auto | compare (const_pointer s) const -> int |
| Compares this string to the null-terminated character sequence beginning at the character pointed to by s with length traits_type::length(s).
|
|
constexpr auto | compare (size_type const pos, size_type const count, basic_inplace_string const &str) const -> int |
| Compares a [pos, pos+count) substring of this string to str. If count > size() - pos the substring is [pos, size()).
|
|
constexpr auto | compare (size_type const pos, size_type const count, const_pointer s) const -> int |
| Compares a [pos1, pos1+count1) substring of this string to the null-terminated character sequence beginning at the character pointed to by s with length traits_type::length(s). If count1 > size() - pos1 the substring is [pos1, size()).
|
|
constexpr auto | compare (size_type const pos1, size_type const count1, basic_inplace_string const &str, size_type const pos2, size_type const count2=npos) const -> int |
| Compares a [pos1, pos1+count1) substring of this string to a substring [pos2, pos2+count2) of str. If count1 > size() - pos1 the first substring is [pos1, size()). Likewise, count2 > str.size() - pos2 the second substring is [pos2, str.size()).
|
|
constexpr auto | compare (size_type const pos1, size_type const count1, const_pointer s, size_type const count2) const -> int |
| Compares a [pos1, pos1+count1) substring of this string to the characters in the range [s, s + count2). If count1 > size() - pos1 the substring is [pos1, size()). (Note: the characters in the range [s, s + count2) may include null characters.)
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | compare (size_type pos1, size_type count1, StringView const &view) const noexcept -> int |
| Implicitly converts view to a string view sv, then compares a [pos1, pos1+count1) substring of this string to sv.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | compare (size_type pos1, size_type count1, StringView const &view, size_type pos2, size_type count2=npos) const noexcept -> int |
| Implicitly converts view to a string view sv, then compares a [pos1, pos1+count1) substring of this string to a substring [pos2, pos2+count2) of sv.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | compare (StringView const &view) const noexcept -> int |
| Implicitly converts view to a string view sv, then compares the content of this string to sv.
|
|
constexpr auto | contains (Char c) const noexcept -> bool |
| Checks if the string contains the given substring.
|
|
constexpr auto | contains (Char const *s) const -> bool |
| Checks if the string contains the given substring.
|
|
constexpr auto | contains (etl::basic_string_view< Char, Traits > sv) const noexcept -> bool |
| Checks if the string contains the given substring.
|
|
constexpr auto | copy (pointer destination, size_type count, size_type pos=0) const -> size_type |
| Copies a substring [pos, pos+count) to character string pointed to by dest. If the requested substring lasts past the end of the string, or if count == npos, the copied substring is [pos, size()). The resulting character string is not null-terminated.
|
|
constexpr auto | crbegin () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the first character of the reversed string. It corresponds to the last character of the non-reversed string.
|
|
constexpr auto | crend () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the first character of the reversed string. It corresponds to the last character of the non-reversed string.
|
|
constexpr auto | data () const noexcept -> const_pointer |
| Returns a pointer to the underlying array serving as character storage. The pointer is such that the range [data(); data() + size()) is valid and the values in it correspond to the values stored in the string.
|
|
constexpr auto | data () noexcept -> pointer |
| Returns a pointer to the underlying array serving as character storage. The pointer is such that the range [data(); data() + size()) is valid and the values in it correspond to the values stored in the string.
|
|
constexpr auto | empty () const noexcept -> bool |
| Checks whether the string is empty.
|
|
constexpr auto | end () const noexcept -> const_iterator |
| Returns an const iterator to the end.
|
|
constexpr auto | end () noexcept -> iterator |
| Returns an iterator to the end.
|
|
constexpr auto | ends_with (basic_string_view< Char, Traits > sv) const noexcept -> bool |
| Checks if the string ends with the given prefix.
|
|
constexpr auto | ends_with (Char c) const noexcept -> bool |
| Checks if the string ends with the given prefix.
|
|
constexpr auto | ends_with (const_pointer str) const -> bool |
| Checks if the string ends with the given prefix.
|
|
constexpr auto | erase (const_iterator first, const_iterator last) noexcept -> iterator |
| Removes the characters in the range [first, last).
|
|
constexpr auto | erase (const_iterator position) noexcept -> iterator |
| Removes the character at position.
|
|
constexpr auto | erase (size_type index=0, size_type count=npos) noexcept -> basic_inplace_string & |
| Removes min(count, size() - index) characters starting at index.
|
|
constexpr auto | find (basic_inplace_string const &str, size_type pos=0) const noexcept -> size_type |
| Finds the first substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position preceding pos.
|
|
constexpr auto | find (Char ch, size_type pos=0) const noexcept -> size_type |
| Finds the first substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position preceding pos.
|
|
constexpr auto | find (const_pointer s, size_type pos, size_type count) const noexcept -> size_type |
| Finds the first substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position preceding pos.
|
|
constexpr auto | find (const_pointer s, size_type pos=0) const noexcept -> size_type |
| Finds the first substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position preceding pos.
|
|
constexpr auto | find_first_not_of (basic_inplace_string const &str, size_type pos=0) const noexcept -> size_type |
| Finds the first character not equal to any of the characters in the given character sequence.
|
|
constexpr auto | find_first_not_of (Char ch, size_type pos=0) const noexcept -> size_type |
| Finds the first character not equal to any of the characters in the given character sequence.
|
|
constexpr auto | find_first_not_of (Char const *s, size_type pos) const -> size_type |
| Finds the first character not equal to any of the characters in the given character sequence.
|
|
constexpr auto | find_first_not_of (Char const *s, size_type pos, size_type count) const -> size_type |
| Finds the first character not equal to any of the characters in the given character sequence.
|
|
constexpr auto | find_first_of (basic_inplace_string const &str, size_type pos=0) const noexcept -> size_type |
| Finds the first character equal to one of the characters in the given character sequence. The search considers only the interval [pos, size()). If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_first_of (basic_string_view< Char, traits_type > str, size_type pos=0) const noexcept -> size_type |
| Finds the first character equal to one of the characters in the given character sequence. The search considers only the interval [pos, size()). If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_first_of (Char ch, size_type pos=0) const noexcept -> size_type |
| Finds the first character equal to one of the characters in the given character sequence. The search considers only the interval [pos, size()). If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_first_of (const_pointer s, size_type pos, size_type count) const -> size_type |
| Finds the first character equal to one of the characters in the given character sequence. The search considers only the interval [pos, size()). If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_first_of (const_pointer s, size_type pos=0) const -> size_type |
| Finds the first character equal to one of the characters in the given character sequence. The search considers only the interval [pos, size()). If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_not_of (basic_inplace_string const &str, size_type pos=0) const noexcept -> size_type |
| Finds the last character equal to none of the characters in the given character sequence. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_not_of (Char c, size_type pos=0) const noexcept -> size_type |
| Finds the last character equal to none of the characters in the given character sequence. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_not_of (Char const *s, size_type pos, size_type count) const -> size_type |
| Finds the last character equal to none of the characters in the given character sequence. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_not_of (Char const *s, size_type pos=0) const -> size_type |
| Finds the last character equal to none of the characters in the given character sequence. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_of (basic_inplace_string const &str, size_type pos=0) const noexcept -> size_type |
| Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_of (Char c, size_type pos=0) const noexcept -> size_type |
| Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_of (Char const *s, size_type pos, size_type count) const -> size_type |
| Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | find_last_of (Char const *s, size_type pos=0) const -> size_type |
| Finds the last character equal to one of characters in the given character sequence. The exact search algorithm is not specified. The search considers only the interval [0, pos]. If the character is not present in the interval, npos will be returned.
|
|
constexpr auto | front () const noexcept -> const_reference |
| Accesses the first character.
|
|
constexpr auto | front () noexcept -> reference |
| Accesses the first character.
|
|
constexpr auto | full () const noexcept -> bool |
| Checks whether the string is full. i.e. size() == capacity()
|
|
constexpr auto | insert (size_type const index, basic_inplace_string const &str) noexcept -> basic_inplace_string & |
| Inserts string str at the position index.
|
|
constexpr auto | insert (size_type const index, basic_inplace_string const &str, size_type const indexStr, size_type const count=npos) noexcept -> basic_inplace_string & |
| Inserts a string, obtained by str.substr(index_str, count) at the position index.
|
|
constexpr auto | insert (size_type const index, const_pointer s) noexcept -> basic_inplace_string & |
| Inserts null-terminated character string pointed to by s at the position index.
|
|
constexpr auto | insert (size_type const index, const_pointer s, size_type const count) noexcept -> basic_inplace_string & |
| Inserts the characters in the range [s, s+count) at the position index. The range can contain null characters.
|
|
constexpr auto | insert (size_type const index, size_type const count, Char const ch) noexcept -> basic_inplace_string & |
| Inserts count copies of character ch at the position index.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | insert (size_type const index, StringView const &view, size_type const indexStr, size_type const count=npos) noexcept -> basic_inplace_string & |
| Implicitly converts view to a string view sv, then inserts, before the element (if any) pointed by pos, the characters from the subview [index_str, index_str+count) of sv.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | insert (size_type const pos, StringView const &view) noexcept -> basic_inplace_string & |
| Implicitly converts view to a string view sv, then inserts the elements from sv before the element (if any) pointed by pos.
|
|
constexpr auto | length () const noexcept -> size_type |
| Returns the number of characters.
|
|
constexpr auto | max_size () const noexcept -> size_type |
| Returns the number of characters that can be held in allocated storage, NOT including the null terminator.
|
|
constexpr | operator basic_string_view< Char, traits_type > () const noexcept |
| Returns a etl::basic_string_view.
|
|
constexpr auto | operator+= (basic_inplace_string const &str) noexcept -> basic_inplace_string & |
| Appends string str.
|
|
constexpr auto | operator+= (Char ch) noexcept -> basic_inplace_string & |
| Appends character ch.
|
|
constexpr auto | operator+= (const_pointer s) noexcept -> basic_inplace_string & |
| Appends the null-terminated character string pointed to by s.
|
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | operator+= (StringView const &view) noexcept -> basic_inplace_string & |
| Implicitly converts view to a string view sv, then appends characters in the string view sv.
|
|
constexpr auto | operator= (basic_inplace_string &&) noexcept -> basic_inplace_string &=default |
| Defaulted move assignment.
|
|
constexpr auto | operator= (basic_inplace_string const &) noexcept -> basic_inplace_string &=default |
| Defaulted copy assignment.
|
|
constexpr auto | operator= (Char ch) noexcept -> basic_inplace_string & |
| Replaces the contents with character ch.
|
|
constexpr auto | operator= (const_pointer s) noexcept -> basic_inplace_string & |
| Replaces the contents with those of null-terminated character string pointed to by s.
|
|
constexpr auto | operator= (nullptr_t) -> basic_inplace_string &=delete |
|
template<typename StringView>
requires string_view_like<StringView> |
constexpr auto | operator= (StringView const &view) noexcept -> basic_inplace_string & |
| Implicitly converts view to a string view sv, then replaces the contents with those of the sv.
|
|
constexpr auto | operator[] (size_type index) const noexcept -> const_reference |
| Accesses the specified character without bounds checking.
|
|
constexpr auto | operator[] (size_type index) noexcept -> reference |
| Accesses the specified character without bounds checking.
|
|
constexpr auto | pop_back () noexcept -> void |
| Removes the last character from the string.
|
|
constexpr auto | push_back (Char ch) noexcept -> void |
| Appends the given character ch to the end of the string.
|
|
constexpr auto | rbegin () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the first character of the reversed string. It corresponds to the last character of the non-reversed string.
|
|
constexpr auto | rbegin () noexcept -> reverse_iterator |
| Returns a reverse iterator to the first character of the reversed string. It corresponds to the last character of the non-reversed string.
|
|
constexpr auto | rend () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the first character of the reversed string. It corresponds to the last character of the non-reversed string.
|
|
constexpr auto | rend () noexcept -> reverse_iterator |
| Returns a reverse iterator to the first character of the reversed string. It corresponds to the last character of the non-reversed string.
|
|
constexpr auto | replace (const_iterator first, const_iterator last, basic_inplace_string const &str) -> basic_inplace_string & |
| Replaces the part of the string indicated [first, last) with a new string.
|
|
constexpr auto | replace (const_iterator first, const_iterator last, Char const *str) -> basic_inplace_string & |
|
constexpr auto | replace (const_iterator first, const_iterator last, Char const *str, size_type count2) -> basic_inplace_string & |
|
constexpr auto | replace (const_iterator first, const_iterator last, size_type count2, Char ch) -> basic_inplace_string & |
|
constexpr auto | replace (size_type pos, size_type count, basic_inplace_string const &str) -> basic_inplace_string & |
| Replaces the part of the string indicated [pos, pos + count) with a new string.
|
|
constexpr auto | replace (size_type pos, size_type count, basic_inplace_string const &str, size_type pos2, size_type count2=npos) -> basic_inplace_string & |
|
constexpr auto | replace (size_type pos, size_type count, Char const *str) -> basic_inplace_string & |
|
constexpr auto | replace (size_type pos, size_type count, Char const *str, size_type count2) -> basic_inplace_string & |
|
constexpr auto | resize (size_type count) noexcept -> void |
| Resizes the string to contain count characters.
|
|
constexpr auto | resize (size_type count, Char ch) noexcept -> void |
| Resizes the string to contain count characters.
|
|
constexpr auto | rfind (basic_inplace_string const &str, size_type pos=0) const noexcept -> size_type |
| Finds the last substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position following pos. If npos or any value not smaller than size()-1 is passed as pos, whole string will be searched.
|
|
constexpr auto | rfind (Char ch, size_type pos=0) const noexcept -> size_type |
| Finds the last substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position following pos. If npos or any value not smaller than size()-1 is passed as pos, whole string will be searched.
|
|
constexpr auto | rfind (const_pointer s, size_type pos, size_type count) const noexcept -> size_type |
| Finds the last substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position following pos. If npos or any value not smaller than size()-1 is passed as pos, whole string will be searched.
|
|
constexpr auto | rfind (const_pointer s, size_type pos=0) const noexcept -> size_type |
| Finds the last substring equal to the given character sequence. Search begins at pos, i.e. the found substring must not begin in a position following pos. If npos or any value not smaller than size()-1 is passed as pos, whole string will be searched.
|
|
constexpr auto | size () const noexcept -> size_type |
| Returns the number of characters.
|
|
constexpr auto | starts_with (basic_string_view< Char, Traits > sv) const noexcept -> bool |
| Checks if the string begins with the given prefix.
|
|
constexpr auto | starts_with (Char c) const noexcept -> bool |
| Checks if the string begins with the given prefix.
|
|
constexpr auto | starts_with (const_pointer s) const -> bool |
| Checks if the string begins with the given prefix.
|
|
constexpr auto | substr (size_type pos=0, size_type count=npos) const -> basic_inplace_string |
| Returns a substring [pos, pos+count). If the requested substring extends past the end of the string, or if count == npos, the returned substring is [pos, size()).
|
|
constexpr auto | swap (basic_inplace_string &other) noexcept -> void |
| Exchanges the contents of the string with those of other. All iterators and references may be invalidated.
|
|