Describes an object that can refer to a constant contiguous sequence of char-like objects with the first element of the sequence at position zero.
Similar to std::string_view introduced in C++17.
|
| StringView () noexcept=default |
| Default constructor.
|
|
template<std::size_t TN> |
| StringView (char(&str)[TN]) noexcept |
| Construct out of array of characters with known size.
|
|
| StringView (const char *str) noexcept |
| Constructor.
|
|
| StringView (const char *str, size_type len) noexcept |
| Constructor.
|
|
template<std::size_t TN> |
| StringView (const char(&str)[TN]) noexcept |
| Construct out of array of characters with known size.
|
|
| StringView (const std::string &str) noexcept |
| Constructor.
|
|
| StringView (const StringView &) noexcept=default |
| Copy constructor.
|
|
| ~StringView () noexcept=default |
| Destructor.
|
|
const_reference | at (size_type pos) const |
| Similar to std::string::at()
|
|
constexpr const_reference | back () const |
| Same as std::string_view::back()
|
|
constexpr iterator | begin () const noexcept |
| Same as std::string_view::begin().
|
|
constexpr const_iterator | cbegin () const noexcept |
| Same as std::string_view::cbegin().
|
|
constexpr const_iterator | cend () const noexcept |
| Same as std::string_view::end().
|
|
int | compare (const char *s) const |
| Same as std::string_view::compare().
|
|
int | compare (const StringView &other) const |
| Same as std::string_view::compare().
|
|
int | compare (size_type pos, size_type count, const char *s) const |
| Same as std::string_view::compare().
|
|
int | compare (size_type pos, size_type count, const StringView &other) const |
| Same as std::string_view::compare().
|
|
int | compare (size_type pos1, size_type count1, const char *s, size_type count2) const |
| Same as std::string_view::compare().
|
|
int | compare (size_type pos1, size_type count1, const StringView &other, size_type pos2, size_type count2) const |
| Same as std::string_view::compare().
|
|
size_type | copy (char *dest, size_type count, size_type pos=0) const |
| Same as std::string_view::copy().
|
|
const_reverse_iterator | crbegin () const noexcept |
| Same as std::string_view::crbegin().
|
|
const_reverse_iterator | crend () const noexcept |
| Same as std::string_view::crend().
|
|
constexpr const_pointer | data () const noexcept |
| Same as std::string_view::data()
|
|
constexpr bool | empty () const noexcept |
| Same as std::string_view::empty()
|
|
constexpr iterator | end () const noexcept |
| Same as std::string_view::end().
|
|
size_type | find (char c, size_type pos=0) const |
| Same as std::string_view::find().
|
|
size_type | find (const char *str, size_type pos, size_type count) const |
| Same as std::string_view::find().
|
|
size_type | find (const char *str, size_type pos=0) const |
| Same as std::string_view::find().
|
|
size_type | find (const StringView &str, size_type pos=0) const |
| Same as std::string_view::find().
|
|
size_type | find_first_not_of (char c, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_not_of>std::string_view::find_first_not_of.
|
|
size_type | find_first_not_of (const char *str, size_type pos, size_type count) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_not_of>std::string_view::find_first_not_of.
|
|
size_type | find_first_not_of (const char *str, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_not_of>std::string_view::find_first_not_of.
|
|
size_type | find_first_not_of (const StringView &other, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_not_of>std::string_view::find_first_not_of.
|
|
size_type | find_first_of (char c, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_of>std::string_view::find_first_of.
|
|
size_type | find_first_of (const char *str, size_type pos, size_type count) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_of>std::string_view::find_first_of.
|
|
size_type | find_first_of (const char *str, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_of>std::string_view::find_first_of.
|
|
size_type | find_first_of (const StringView &other, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_first_of>std::string_view::find_first_of.
|
|
size_type | find_last_not_of (char c, size_type pos=0) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_not_of>std::string_view::find_last_not_of.
|
|
size_type | find_last_not_of (const char *str, size_type pos, size_type count) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_not_of>std::string_view::find_last_not_of.
|
|
size_type | find_last_not_of (const char *str, size_type pos=npos) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_not_of>std::string_view::find_last_not_of.
|
|
size_type | find_last_not_of (const StringView &other, size_type pos=npos) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_not_of>std::string_view::find_last_not_of.
|
|
size_type | find_last_of (char c, size_type pos=npos) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_of>std::string_view::find_last_of.
|
|
size_type | find_last_of (const char *str, size_type pos, size_type count) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_of>std::string_view::find_last_of.
|
|
size_type | find_last_of (const char *str, size_type pos=npos) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_of>std::string_view::find_last_of.
|
|
size_type | find_last_of (const StringView &other, size_type pos=npos) |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/find_last_of>std::string_view::find_last_of.
|
|
constexpr const_reference | front () const |
| Same as std::string_view::front()
|
|
constexpr size_type | length () const noexcept |
| Same as std::string_view::length()
|
|
template<std::size_t TN> |
StringView & | operator= (char(&str)[TN]) |
| Assign array of characters with known size.
|
|
template<std::size_t TN> |
StringView & | operator= (const char(&str)[TN]) |
| Assign array of characters with known size.
|
|
StringView & | operator= (const StringView &)=default |
| Copy assign.
|
|
constexpr const_reference | operator[] (size_type pos) const |
| Same as std::string_view::oprator[]()
|
|
const_reverse_iterator | rbegin () const noexcept |
| Same as std::string_view::rbegin().
|
|
void | remove_prefix (size_type n) |
| Same as std::string_view::remove_prefix()
|
|
void | remove_suffix (size_type n) |
| Same as std::string_view::remove_suffix()
|
|
reverse_iterator | rend () const noexcept |
| Same as std::string_view::rend().
|
|
constexpr size_type | size () const noexcept |
| Same as std::string_view::size()
|
|
std::string | substr (size_type pos=0, size_type count=npos) const |
| Same as std::string_view::substr()
|
|
void | swap (ArrayView &other) noexcept |
| Swap contents of two views.
|
|
void | swap (StringView &other) noexcept |
| Same as <a href="http://en.cppreference.com/w/cpp/string/basic_string_view/swap>std::string_view::swap().
|
|
|
(Note that these are not member symbols.)
|
bool | operator!= (const ArrayView< char > &view1, const ArrayView< char > &view2) noexcept |
| Inequality compare between the views.
|
|
bool | operator!= (const StringView &str1, const StringView &str2) |
| Inequality compare between the string views.
|
|
bool | operator< (const ArrayView< char > &view1, const ArrayView< char > &view2) noexcept |
| Lexicographical compare between the views.
|
|
bool | operator< (const StringView &str1, const StringView &str2) |
| Lexicographical compare between the string views.
|
|
bool | operator<= (const ArrayView< char > &view1, const ArrayView< char > &view2) noexcept |
| Lexicographical compare between the views.
|
|
bool | operator<= (const StringView &str1, const StringView &str2) |
| Lexicographical compare between the string views.
|
|
bool | operator== (const ArrayView< char > &view1, const ArrayView< char > &view2) noexcept |
| Equality compare between the views.
|
|
bool | operator== (const StringView &str1, const StringView &str2) |
| Equality compare between the string views.
|
|
bool | operator> (const ArrayView< char > &view1, const ArrayView< char > &view2) noexcept |
| Lexicographical compare between the views.
|
|
bool | operator> (const StringView &str1, const StringView &str2) |
| Lexicographical compare between the string views.
|
|
bool | operator>= (const ArrayView< char > &view1, const ArrayView< char > &view2) noexcept |
| Lexicographical compare between the views.
|
|
bool | operator>= (const StringView &str1, const StringView &str2) |
| Lexicographical compare between the string views.
|
|
void | swap (comms::util::StringView &str1, comms::util::StringView &str2) |
| Specializes the std::swap algorithm.
|
|