General Utility Library for C++14
2.12
|
A view to a contiguous sequence of chars or char-like objects.
This is a backport of std::string_view from libc++ for C++17.
#include <string_view.h>
Public Member Functions | |
constexpr | basic_string_view (const basic_string_view &rhs) noexcept=default |
basic_string_view & | operator= (const basic_string_view &rhs) noexcept=default |
template<typename Allocator , typename Traits > | |
basic_string_view (const std::basic_string< charT, Traits, Allocator > &str) noexcept | |
constexpr | basic_string_view (const charT *str) |
constexpr | basic_string_view (const charT *str, size_type len) |
constexpr const_iterator | begin () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr const_iterator | end () const noexcept |
constexpr const_iterator | cend () const noexcept |
const_reverse_iterator | rbegin () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | rend () const noexcept |
const_reverse_iterator | crend () const noexcept |
constexpr size_type | size () const noexcept |
constexpr size_type | length () const noexcept |
constexpr size_type | max_size () const noexcept |
constexpr bool | empty () const noexcept |
constexpr const_reference | operator[] (size_type pos) const noexcept |
constexpr const_reference | at (size_type pos) const |
constexpr const_reference | front () const |
constexpr const_reference | back () const |
constexpr const_pointer | data () const noexcept |
constexpr void | remove_prefix (size_type n) |
constexpr void | remove_suffix (size_type n) |
constexpr void | swap (basic_string_view &s) noexcept |
template<typename Allocator > | |
operator std::basic_string< charT, typename traits::base_traits, Allocator > () const | |
size_type | copy (charT *s, size_type n, size_type pos=0) const |
constexpr basic_string_view | substr (size_type pos, size_type n=npos) const |
constexpr int | compare (basic_string_view x) const noexcept |
constexpr int | compare (size_type pos1, size_type n1, basic_string_view x) const noexcept |
constexpr int | compare (size_type pos1, size_type n1, basic_string_view x, size_type pos2, size_type n2) const |
constexpr int | compare (const charT *x) const |
constexpr int | compare (size_type pos1, size_type n1, const charT *x) const |
constexpr int | compare (size_type pos1, size_type n1, const charT *x, size_type n2) const |
constexpr size_type | find (basic_string_view s, size_type pos=0) const noexcept |
constexpr size_type | find (charT c, size_type pos=0) const noexcept |
constexpr size_type | find (const charT *s, size_type pos, size_type n) const noexcept |
constexpr size_type | find (const charT *s, size_type pos=0) const noexcept |
constexpr size_type | rfind (basic_string_view s, size_type pos=npos) const noexcept |
constexpr size_type | rfind (charT c, size_type pos=npos) const noexcept |
constexpr size_type | rfind (const charT *s, size_type pos, size_type n) const noexcept |
constexpr size_type | rfind (const charT *s, size_type pos=npos) const noexcept |
constexpr size_type | find_first_of (basic_string_view s, size_type pos=0) const noexcept |
constexpr size_type | find_first_of (charT c, size_type pos=0) const noexcept |
constexpr size_type | find_first_of (const charT *s, size_type pos, size_type n) const noexcept |
constexpr size_type | find_first_of (const charT *s, size_type pos=0) const noexcept |
constexpr size_type | find_last_of (basic_string_view s, size_type pos=npos) const noexcept |
constexpr size_type | find_last_of (charT c, size_type pos=npos) const noexcept |
constexpr size_type | find_last_of (const charT *s, size_type pos, size_type n) const noexcept |
constexpr size_type | find_last_of (const charT *s, size_type pos=npos) const noexcept |
constexpr size_type | find_first_not_of (basic_string_view s, size_type pos=0) const noexcept |
constexpr size_type | find_first_not_of (charT c, size_type pos=0) const noexcept |
constexpr size_type | find_first_not_of (const charT *s, size_type pos, size_type n) const noexcept |
constexpr size_type | find_first_not_of (const charT *s, size_type pos=0) const noexcept |
constexpr size_type | find_last_not_of (basic_string_view s, size_type pos=npos) const noexcept |
constexpr size_type | find_last_not_of (charT c, size_type pos=npos) const noexcept |
constexpr size_type | find_last_not_of (const charT *s, size_type pos, size_type n) const noexcept |
constexpr size_type | find_last_not_of (const charT *s, size_type pos=npos) const noexcept |
Static Public Attributes | |
static constexpr size_type | npos = size_type(-1) |