![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
Backport of the C++17 std::string_view class. More...

Public Types | |
| using | const_iterator = const_char_span::const_iterator |
Const qualified version of iterator. | |
| using | const_pointer = const_char_span::const_pointer |
Const qualified version of pointer. | |
| using | const_reference = const_char_span::const_reference |
Const qualified version of reference. | |
| using | const_reverse_iterator = const_char_span::const_reverse_iterator |
| Alias to the const-qualified reverse iterator. | |
| using | difference_type = std::ptrdiff_t |
| Alias associated to the type used for indexing. | |
| using | element_type = const_char_span::element_type |
| Alias to the type associated to a single contained character. | |
| using | iterator = const_char_span::iterator |
| Alias to the iterator associated with the string_view class. | |
| using | pointer = const_char_span::pointer |
| Alias to the pointer type associated to the underlying data. | |
| using | reference = const_char_span::reference |
| Alias to the reference type associated to the underlying data. | |
| using | reverse_iterator = const_char_span::reverse_iterator |
| Alias to the reverse iterator. | |
| using | size_type = std::size_t |
| Alias for the type associated to the size of the string. | |
| using | value_type = const_char_span::value_type |
| Same that element_type but without any cv-qualifier. | |
Public Member Functions | |
| constexpr | string_view () noexcept=default |
| Default constructor, creates an empty string_view. | |
| template<std::size_t N> | |
| constexpr | string_view (character const (&literal)[N]) noexcept |
| Constructor from compile time string literal or c-array. | |
| constexpr | string_view (raw_c_string const null_terminated_string) noexcept |
| Construct a string_view from a null terminated string, non-inclusive of the null terminator. | |
| constexpr | string_view (raw_c_string const str, std::size_t const str_length) noexcept |
| Constructor for string_view from const char* string and explicit size. | |
| template<typename String, constraints< std::enable_if_t< std::is_same< String, std::string >::value > > = nullptr> | |
| string_view (String const &str) noexcept | |
Construct a string_view from a std::string. | |
| constexpr | string_view (string_view &&other) noexcept=default |
| Default move constructor. | |
| constexpr | string_view (string_view const &other) noexcept=default |
| Default copy constructor. | |
| ~string_view ()=default | |
| Default destructor. | |
| constexpr auto | back () const noexcept -> const_reference |
| Get the last character in the string. | |
| constexpr auto | begin () const noexcept -> const_iterator |
| Begin const iterator. | |
| constexpr auto | cbegin () const noexcept -> const_iterator |
| Begin const iterator. | |
| constexpr auto | cend () const noexcept -> const_iterator |
| End const iterator. | |
| constexpr auto | compare (raw_c_string const other) const noexcept -> integral_comparison_result |
| Compare a string_view against a null-terminated string. | |
| constexpr auto | compare (size_type const pos1, size_type const length1, raw_c_string const other) const noexcept -> integral_comparison_result |
| Compare a substring against a null terminated string. | |
| constexpr auto | compare (size_type const pos1, size_type const length1, raw_c_string const other, size_type const length2) const noexcept -> integral_comparison_result |
| Compare a substring against a string specified as a pointer and length. | |
| constexpr auto | compare (size_type const pos1, size_type const length1, string_view const other) const noexcept -> integral_comparison_result |
| Compare a substring against another string view. | |
| constexpr auto | compare (size_type const pos1, size_type const length1, string_view const other, size_type const pos2, size_type const length2) const noexcept -> integral_comparison_result |
| Compare a substring against a substring of another string view. | |
| constexpr auto | compare (string_view const other) const noexcept -> integral_comparison_result |
| lexicographically compares two string_view, behavior similar to std::string | |
| constexpr auto | copy (character *const dest, size_type const n) const noexcept -> size_type |
Copy the first min(n,size()) characters to the destination buffer. | |
| constexpr auto | copy (character *const dest, size_type const n, size_type const pos) const noexcept -> size_type |
Copy the first min(n,size()-pos) characters to the destination buffer. | |
| constexpr auto | crbegin () const noexcept -> const_reverse_iterator |
| Obtain a reverse iterator referring to the end of the string_view. | |
| constexpr auto | crend () const noexcept -> const_reverse_iterator |
| Obtain a reverse iterator referring to one-before the front of the string_view. | |
| constexpr auto | data () const noexcept -> const_pointer |
| Get a pointer to the first character in the string. | |
| constexpr auto | empty () const noexcept -> bool |
| Query if this is the empty string. | |
| constexpr auto | end () const noexcept -> const_iterator |
| End const iterator. | |
| constexpr auto | ends_with (character const chr) const noexcept -> bool |
| Check if the string ends with a specific character. | |
| constexpr auto | ends_with (raw_c_string const other) const noexcept -> bool |
| Check if the string ends with another string. | |
| constexpr auto | ends_with (string_view const other) const noexcept -> bool |
| Check if the string ends with another string. | |
| constexpr auto | find (character const chr, size_type const pos=0U) const noexcept -> size_type |
| Find the earliest position of the specified character within the string, starting at the specified position. | |
| constexpr auto | find (raw_c_string const str, size_type const pos, size_type const n) const noexcept -> size_type |
Find the earliest position of the n character string starting at str within the string, starting at the specified position. | |
| constexpr auto | find (raw_c_string const str, size_type const pos=0U) const noexcept -> size_type |
| Find the earliest position of the given substring within the string, starting at the specified position. | |
| constexpr auto | find (string_view const str, size_type const pos=0U) const noexcept -> size_type |
| Find the earliest position of the given substring within the string, starting at the specified position. | |
| constexpr auto | find_first_not_of (character const chr, size_type const pos=0U) const noexcept -> size_type |
| Finds the first character not equal to the provided character. | |
| constexpr auto | find_first_not_of (raw_c_string const str, size_type const pos, size_type const n) 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 (raw_c_string const str, size_type const pos=0U) 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 (string_view const str, size_type const pos=0U) const noexcept -> size_type |
| Finds the first character not equal to any of the characters in the given character sequence. | |
| constexpr auto | find_first_of (character const chr, size_type const pos=0U) const noexcept -> size_type |
| Finds the first character equal to the specified character. | |
| constexpr auto | find_first_of (raw_c_string const str, size_type const pos, size_type const n) const noexcept -> size_type |
| Finds the first character equal to any of the characters in the given character sequence. | |
| constexpr auto | find_first_of (raw_c_string const str, size_type const pos=0U) const noexcept -> size_type |
| Finds the first character equal to any of the characters in the given character sequence. | |
| constexpr auto | find_first_of (string_view const str, size_type const pos=0U) const noexcept -> size_type |
| Finds the first character equal to any of the characters in the given character sequence. | |
| constexpr auto | find_last_not_of (character const chr, size_type const pos=npos) const noexcept -> size_type |
| Finds the last character equal to the provided character. | |
| constexpr auto | find_last_not_of (raw_c_string const str, size_type const pos, size_type const n) const noexcept -> size_type |
| Finds the last character not equal to any of the characters in the given character sequence. | |
| constexpr auto | find_last_not_of (raw_c_string const str, size_type const pos=npos) const noexcept -> size_type |
| Finds the last character not equal to any of the characters in the given character sequence. | |
| constexpr auto | find_last_not_of (string_view const str, size_type const pos=npos) const noexcept -> size_type |
| Finds the last character not equal to any of the characters in the given character sequence. | |
| constexpr auto | find_last_of (character const chr, size_type const pos=npos) const noexcept -> size_type |
| Finds the last character equal to the provided character. | |
| constexpr auto | find_last_of (raw_c_string const str, size_type const pos, size_type const n) const noexcept -> size_type |
| Finds the last character equal to one of characters in the given character sequence. | |
| constexpr auto | find_last_of (raw_c_string const str, size_type const pos=npos) const noexcept -> size_type |
| Finds the last character equal to one of characters in the given character sequence. | |
| constexpr auto | find_last_of (string_view const str, size_type const pos=npos) const noexcept -> size_type |
| Finds the last character equal to one of characters in the given character sequence. | |
| constexpr auto | front () const noexcept -> const_reference |
| Get the first character in the string. | |
| constexpr auto | length () const noexcept -> size_type |
| Get the length of the string view. | |
| operator std::string () const | |
| Implicit conversion to std::string. Provided since we cannot patch C++17's string_view constructor onto std::string. | |
| constexpr auto | operator= (string_view &&other) noexcept -> string_view &=default |
| Move assignment operator for the string view. | |
| constexpr auto | operator= (string_view const &other) noexcept -> string_view &=default |
| Assignment operator for the string view. | |
| constexpr auto | operator[] (std::size_t pos) const noexcept -> const_reference |
| Get a character at position pos in the string. | |
| constexpr auto | rbegin () const noexcept -> reverse_iterator |
| Obtain a reverse iterator referring to the end of the string. | |
| constexpr void | remove_prefix (size_type const count) noexcept |
Remove the first n characters from the string. | |
| constexpr void | remove_suffix (size_type const count) noexcept |
Remove the last n characters from the string. | |
| constexpr auto | rend () const noexcept -> reverse_iterator |
| Obtain a reverse iterator referring to one-before the front of the string_view. | |
| constexpr auto | rfind (character const chr, size_type const pos=npos) const noexcept -> size_type |
| Find the latest position of the specified character within the string, starting at the specified position. | |
| constexpr auto | rfind (raw_c_string const str, size_type const pos, size_type const n) const noexcept -> size_type |
Find the latest position of the n character string starting at str within the string, starting at the specified position. | |
| constexpr auto | rfind (raw_c_string const str, size_type const pos=npos) const noexcept -> size_type |
| Find the latest position of the given substring within the string, starting at the specified position. | |
| constexpr auto | rfind (string_view const str, size_type const pos=npos) const noexcept -> size_type |
| Find the latest position of the given substring within the string, starting at the specified position. | |
| constexpr auto | size () const noexcept -> size_type |
| Get the length of the string view. | |
| constexpr auto | starts_with (character const chr) const noexcept -> bool |
| Check if the string starts with a specific character. | |
| constexpr auto | starts_with (raw_c_string const other) const noexcept -> bool |
| Check if the string starts with another string. | |
| constexpr auto | starts_with (string_view const other) const noexcept -> bool |
| Check if the string starts with another string. | |
| constexpr auto | substr () const noexcept -> string_view |
Create a new string view referencing the same string as *this. | |
| constexpr auto | substr (size_type const pos, size_type const count=npos) const noexcept -> string_view |
| Create a new string view based on a substring of the current one. | |
| constexpr void | swap (string_view &other) noexcept |
| Swap the content of two string_view objects. | |
Static Public Member Functions | |
| static constexpr auto | fast_inequality_check (string_view const first, string_view const second) noexcept -> inequality_heuristic |
| quick check that string views have the same size to quickly identify non-equal strings. | |
| static constexpr auto | max_size () noexcept -> size_type |
Get the maximum possible length of a string_view. | |
| static constexpr auto | three_way_compare (string_view const lhs, string_view const rhs) noexcept -> strong_ordering |
Compare two string_view objects lexicographically. | |
Static Public Attributes | |
| static constexpr std::size_t | npos {std::numeric_limits<std::size_t>::max()} |
| Special marker value for end of string. | |
Backport of the C++17 std::string_view class.
http://en.cppreference.com/w/cpp/string/basic_string_view
This implementation is minimalist but API compatible with the std:: one.
Const qualified version of iterator.
Const qualified version of pointer.
Const qualified version of reference.
Alias to the const-qualified reverse iterator.
Alias associated to the type used for indexing.
Alias to the type associated to a single contained character.
Alias to the iterator associated with the string_view class.
Alias to the pointer type associated to the underlying data.
Alias to the reference type associated to the underlying data.
Alias to the reverse iterator.
Alias for the type associated to the size of the string.
Same that element_type but without any cv-qualifier.
|
constexprdefaultnoexcept |
Default constructor, creates an empty string_view.
|
inlineconstexprnoexcept |
Constructor for string_view from const char* string and explicit size.
| str | Pointer to the first character of the string. May contain null characters. |
| str_length | The number of char elements in the string. |
str must point to an array of at least str_length characters, else behavior is undefined.
|
inlineconstexprnoexcept |
Constructor from compile time string literal or c-array.
| literal | string literal used for the string_view construction |
| N | The number of char elements in the string |
|
inlineconstexprnoexcept |
Construct a string_view from a null terminated string, non-inclusive of the null terminator.
| null_terminated_string | null terminated string |
|
inlinenoexcept |
Construct a string_view from a std::string.
| str | The std::string to create a view to. |
const std::string& to avoid the possibility of unknowingly constructing a temporary std::string implicitly by passing something that is convertible to std::string such as a std::initializer_list<char>
|
constexprdefaultnoexcept |
Default copy constructor.
|
constexprdefaultnoexcept |
Default move constructor.
|
default |
Default destructor.
|
inlineconstexprnoexcept |
Get the last character in the string.
empty() != false else ARENE_PRECONDITION violation
|
inlineconstexprnoexcept |
Begin const iterator.
|
inlineconstexprnoexcept |
Begin const iterator.
|
inlineconstexprnoexcept |
End const iterator.
|
inlineconstexprnoexcept |
Compare a string_view against a null-terminated string.
| other | The other string view to compare with |
*this.compare(string_view{other}).
|
inlineconstexprnoexcept |
Compare a substring against a null terminated string.
| pos1 | The offset of the substring to compare |
| length1 | The length of the substring to compare |
| other | The other string view to compare with |
*this.substr(pos1, length1).compare(string_view{other}).
|
inlineconstexprnoexcept |
Compare a substring against a string specified as a pointer and length.
| pos1 | The offset of the substring to compare |
| length1 | The length of the substring to compare |
| other | Pointer to the other string to compare with |
| length2 | The length of the other string to compare |
*this.substr(pos1, length1).compare(string_view{other, length2}). length2 is in the range of other otherwise behavior is undefined.
|
inlineconstexprnoexcept |
Compare a substring against another string view.
| pos1 | The offset of the substring to compare |
| length1 | The length of the substring to compare |
| other | The other string view to compare with |
*this.substr(pos1, length1).compare(other).
|
inlineconstexprnoexcept |
Compare a substring against a substring of another string view.
| pos1 | The offset of the substring to compare |
| length1 | The length of the substring to compare |
| other | The other string view to compare with |
| pos2 | The offset of the other substring to compare |
| length2 | The length of the other substring to compare |
*this.substr(pos1, length1).compare(other.substr(pos2, length2)).
|
inlineconstexprnoexcept |
lexicographically compares two string_view, behavior similar to std::string
| other | other string view to compare with |
0 if the length of this and other are equal and all characters compare equal. -1 if the value of the first character that does not match is lexicographically less in this than other . -1 if the length of this is less than the length of other and all characters in the overlapping subset of this match those in other . 1 if the value of the first character that does not match is lexicographically greater in this than other . 1 if the length of this is greater than the length of other and all characters in the overlapping subset of lhs match those in other .
|
inlineconstexprnoexcept |
Copy the first min(n,size()) characters to the destination buffer.
| dest | A pointer to the destination buffer. |
| n | The number of characters to attempt to copy. |
|
inlineconstexprnoexcept |
Copy the first min(n,size()-pos) characters to the destination buffer.
| dest | A pointer to the destination buffer to copy the characters to. |
| n | The maximum number of characters to copy |
| pos | The offset in the string of the first character to copy. If >=size() , no content is copied. |
|
inlineconstexprnoexcept |
Obtain a reverse iterator referring to the end of the string_view.
|
inlineconstexprnoexcept |
Obtain a reverse iterator referring to one-before the front of the string_view.
|
inlineconstexprnoexcept |
Get a pointer to the first character in the string.
|
inlineconstexprnoexcept |
Query if this is the empty string.
size() == 0.
|
inlineconstexprnoexcept |
End const iterator.
|
inlineconstexprnoexcept |
Check if the string ends with a specific character.
| chr | The character to check |
true if the string is not empty and the last character is c
|
inlineconstexprnoexcept |
Check if the string ends with another string.
| other | The other string |
string_length(other) characters of this are equal to those in other . other must be a null terminated string or else behavior is undefined.
|
inlineconstexprnoexcept |
Check if the string ends with another string.
| other | The other string |
other.size() characters of this are equal to those in other .
|
inlinestaticconstexprnoexcept |
quick check that string views have the same size to quickly identify non-equal strings.
| first | The first string_view to compare. |
| second | The second string_view to compare. |
inequality_heuristic::definitely_not_equal if the strings have different lengths, inequality_heuristic::may_be_equal_or_not_equal otherwise.
|
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. Defaults to 0. |
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 in this to search from |
| n | The length of the string to search for |
find(string_view{str, n}, pos) str must be a pointer to a character array of at least n characters else behavior is undefined.
|
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. str must be a null terminated string or else behavior is undefined.
|
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 |
Finds the first character not equal to the provided character.
| chr | The character to find |
| pos | The start position to search from. Defaults to 0 . |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the first character not equal to any of the characters in the given character sequence.
| str | The list of characters to compare against. |
| pos | The start position to search from in this . |
| n | The number of characters in str to consider. |
str after pos if there is one, otherwise npos str must be a pointer to a character array of at least n characters else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the first character not equal to any of the characters in the given character sequence.
| str | The list of characters to compare against. |
| pos | The start position to search from. Defaults to 0 . |
str after pos if there is one, otherwise npos str must be a null terminated string or else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the first character not equal to any of the characters in the given character sequence.
| str | The list of characters to compare against. |
| pos | The start position to search from. Defaults to 0 . |
str after pos if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the first character equal to the specified character.
| chr | The character to find |
| pos | The start position to search from. Defaults to 0 . |
this that matches chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the first character equal to any of the characters in the given character sequence.
| str | The list of characters to find any of. |
| pos | The start position in this to search from. |
| n | The number of characters in str to consider. |
str after pos if there is one, otherwise npos str must be a pointer to a character array of at least n characters else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the first character equal to any of the characters in the given character sequence.
| str | The list of characters to find any of |
| pos | The start position to search from. Defaults to 0 . |
this that matches any character in str if there is one, otherwise npos str must be a null terminated string or else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the first character equal to any of the characters in the given character sequence.
| str | The list of characters to find any of |
| pos | The start position to search from. Defaults to 0 . |
this that matches any character in str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the last character equal to the provided character.
| chr | The character to find. |
| pos | The highest position to search from. If pos >= size(), the search starts from the end of the string_view. Defaults to npos . |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the last character not equal to any of the characters in the given character sequence.
| str | The list of characters to consider. |
| pos | The highest position in this to search from. If pos >= size(), the search starts from the end of the string_view. |
| n | The number of characters in str to consider |
str at or before pos if there is one, otherwise npos str must be a pointer to a character array of at least n characters else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the last character not equal to any of the characters in the given character sequence.
| str | The list of characters to consider. |
| pos | The highest position to search from. If pos >= size(), the search starts from the end of the string_view. Defaults to npos |
str if there is one, otherwise npos str must be a null terminated string or else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the last character not equal to any of the characters in the given character sequence.
| str | The list of characters to consider. |
| pos | The highest position to search from. If pos >= size(), the search starts from the end of the string_view. Defaults to npos |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the last character equal to the provided character.
| chr | The character to find. |
| pos | The highest position to search from. If pos >= size(), the search starts from the end of the string_view. |
chr if there is one, otherwise npos
|
inlineconstexprnoexcept |
Finds the last character equal to one of characters in the given character sequence.
| str | The list of characters to compare against. |
| pos | The highest position in this to search from. If pos >= size(), the search starts from the end of the string_view. |
| n | The number of characters in str to consider. |
n characters of str at or after pos if there is one, otherwise npos str must be a pointer to a character array of at least n characters else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the last character equal to one of characters in the given character sequence.
| str | The list of characters to compare against. |
| pos | The highest position to search from. If pos >= size(), the search starts from the end of the string_view. Defaults to npos . |
str if there is one, otherwise npos str must be a null terminated string or else behavior is undefined.
|
inlineconstexprnoexcept |
Finds the last character equal to one of characters in the given character sequence.
| str | The list of characters to compare against. |
| pos | The highest position to search from. If pos >= size(), the search starts from the end of the string_view. Defaults to npos . |
str if there is one, otherwise npos
|
inlineconstexprnoexcept |
Get the first character in the string.
empty() != false else ARENE_PRECONDITION violation
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
Get the maximum possible length of a string_view.
string_view | arene::base::string_view::operator std::string | ( | ) | const |
Implicit conversion to std::string. Provided since we cannot patch C++17's string_view constructor onto std::string.
|
constexprdefaultnoexcept |
Move assignment operator for the string view.
| other | The other string to move from |
|
constexprdefaultnoexcept |
Assignment operator for the string view.
| other | The other string to assign from |
|
inlineconstexprnoexcept |
Get a character at position pos in the string.
| pos | Index of the character to access. |
pos < size() else ARENE_PRECONDITION violation
|
inlineconstexprnoexcept |
Obtain a reverse iterator referring to the end of the string.
|
inlineconstexprnoexcept |
Remove the first n characters from the string.
| count | the number of characters to remove |
substr(n)
|
inlineconstexprnoexcept |
Remove the last n characters from the string.
| count | the number of characters to remove |
substr(0, size() - std::min(count, size()))
|
inlineconstexprnoexcept |
Obtain a reverse iterator referring to one-before the front of the string_view.
|
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. If pos >= size(), the search starts from the end of the string_view. |
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 in this to search from. If pos >= size(), the search starts from the end of the string_view. |
| n | The length of the string to search for |
str can be found within the string, or npos if not found. str must be a pointer to a character array of at least n characters else behavior is undefined.
|
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. If pos >= size(), the search starts from the end of the string_view. |
str can be found within the string, or npos if not found. str must be a null terminated string or else behavior is undefined.
|
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. If pos >= size(), the search starts from the end of the string_view. |
str can be found within the string, or npos if not found.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Check if the string starts with a specific character.
| chr | The character to check |
c
|
inlineconstexprnoexcept |
Check if the string starts with another string.
| other | The string to compare against. |
string_length(other) characters of this are equal to those in other . other must be a null terminated string or else behavior is undefined.
|
inlineconstexprnoexcept |
Check if the string starts with another string.
| other | The string to compare against. |
other.size() characters of this are equal to those in other .
|
inlineconstexprnoexcept |
Create a new string view referencing the same string as *this.
*this
|
inlineconstexprnoexcept |
Create a new string view based on a substring of the current one.
| pos | Position of the first character of the substring. |
| count | The requested length of the substring. |
pos and continuing for count characters. If pos>=size() , or pos+count>=size() , the returned substring is clamped to the end of the string_view .
|
inlineconstexprnoexcept |
Swap the content of two string_view objects.
| other | The other string_view to swap with. |
|
inlinestaticconstexprnoexcept |
Compare two string_view objects lexicographically.
| lhs | The first string to compare |
| rhs | The second string to compare |
|
staticconstexpr |
Special marker value for end of string.