E-MailRelay
|
A class template like c++17's std::basic_string_view. More...
#include <gstringview.h>
Public Types | |
using | traits = std::char_traits< Tchar > |
using | iterator = const Tchar * |
using | const_iterator = const Tchar * |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
using | value_type = Tchar |
Public Member Functions | |
constexpr | basic_string_view (const Tchar *p, std::size_t n) noexcept |
basic_string_view (const Tchar *p) noexcept | |
constexpr | basic_string_view (const Tchar *p, std::nullptr_t) noexcept |
constexpr std::size_t | size () const noexcept |
constexpr std::size_t | length () const noexcept |
constexpr const Tchar * | data () const noexcept |
constexpr bool | empty () const noexcept |
void | swap (basic_string_view< Tchar > &other) noexcept |
constexpr const Tchar & | operator[] (std::size_t i) const |
const Tchar & | at (std::size_t i) const |
const Tchar * | begin () const noexcept |
const Tchar * | cbegin () const noexcept |
const Tchar * | end () const noexcept |
const Tchar * | cend () const noexcept |
bool | operator== (const basic_string_view< Tchar > &other) const noexcept |
bool | operator!= (const basic_string_view< Tchar > &other) const noexcept |
bool | operator< (const basic_string_view< Tchar > &other) const noexcept |
bool | operator<= (const basic_string_view< Tchar > &other) const noexcept |
bool | operator> (const basic_string_view< Tchar > &other) const noexcept |
bool | operator>= (const basic_string_view< Tchar > &other) const noexcept |
int | compare (const basic_string_view< Tchar > &other) const noexcept |
string_view | substr (std::size_t pos, std::size_t count=npos) const |
std::size_t | find (Tchar c) const noexcept |
std::size_t | find (const Tchar *substr_p, std::size_t pos, std::size_t substr_n) const |
std::size_t | find (basic_string_view< Tchar > substr, std::size_t pos=0U) const |
std::size_t | find_first_of (const Tchar *chars, std::size_t pos, std::size_t chars_size) const noexcept |
std::size_t | find_first_of (basic_string_view< Tchar > chars, std::size_t pos=0U) const noexcept |
std::size_t | find_first_not_of (const Tchar *chars, std::size_t pos, std::size_t chars_size) const noexcept |
std::size_t | find_first_not_of (basic_string_view< Tchar > chars, std::size_t pos=0U) const noexcept |
std::basic_string< Tchar > | sv_to_string_imp () const |
Static Public Member Functions | |
static constexpr bool | same (basic_string_view a, basic_string_view b) noexcept |
Static Public Attributes | |
static constexpr std::size_t | npos = std::size_t(-1) |
A class template like c++17's std::basic_string_view.
Compared to std::basic_string_view there is an extra free function for conversion to std::basic_string (G::sv_to_string()) and an extra constructor overload for constinit initialisation:
Definition at line 72 of file gstringview.h.
using G::basic_string_view< Tchar >::const_iterator = const Tchar * |
Definition at line 77 of file gstringview.h.
using G::basic_string_view< Tchar >::difference_type = std::ptrdiff_t |
Definition at line 79 of file gstringview.h.
using G::basic_string_view< Tchar >::iterator = const Tchar * |
Definition at line 76 of file gstringview.h.
using G::basic_string_view< Tchar >::size_type = std::size_t |
Definition at line 78 of file gstringview.h.
using G::basic_string_view< Tchar >::traits = std::char_traits<Tchar> |
Definition at line 75 of file gstringview.h.
using G::basic_string_view< Tchar >::value_type = Tchar |
Definition at line 80 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 83 of file gstringview.h.
|
inlinenoexcept |
Definition at line 88 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 93 of file gstringview.h.
|
inline |
Definition at line 108 of file gstringview.h.
|
inlinenoexcept |
Definition at line 109 of file gstringview.h.
|
inlinenoexcept |
Definition at line 110 of file gstringview.h.
|
inlinenoexcept |
Definition at line 112 of file gstringview.h.
|
inlinenoexcept |
Definition at line 119 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 104 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 105 of file gstringview.h.
|
inlinenoexcept |
Definition at line 111 of file gstringview.h.
|
inline |
Definition at line 145 of file gstringview.h.
|
inline |
Definition at line 141 of file gstringview.h.
|
inlinenoexcept |
Definition at line 129 of file gstringview.h.
|
inlinenoexcept |
Definition at line 177 of file gstringview.h.
|
inlinenoexcept |
Definition at line 173 of file gstringview.h.
|
inlinenoexcept |
Definition at line 157 of file gstringview.h.
|
inlinenoexcept |
Definition at line 153 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 103 of file gstringview.h.
|
inlinenoexcept |
Definition at line 114 of file gstringview.h.
|
inlinenoexcept |
Definition at line 115 of file gstringview.h.
|
inlinenoexcept |
Definition at line 116 of file gstringview.h.
|
inlinenoexcept |
Definition at line 113 of file gstringview.h.
|
inlinenoexcept |
Definition at line 117 of file gstringview.h.
|
inlinenoexcept |
Definition at line 118 of file gstringview.h.
|
inlineconstexpr |
Definition at line 107 of file gstringview.h.
|
inlinestaticconstexprnoexcept |
Definition at line 98 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 102 of file gstringview.h.
|
inline |
Definition at line 124 of file gstringview.h.
|
inline |
Definition at line 196 of file gstringview.h.
|
inlinenoexcept |
Definition at line 106 of file gstringview.h.
|
staticconstexpr |
Definition at line 81 of file gstringview.h.