E-MailRelay
|
A class like c++17's std::string_view. More...
#include <gstringview.h>
Public Types | |
using | traits = std::char_traits< char > |
using | iterator = const char * |
using | const_iterator = const char * |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
using | value_type = char |
Public Member Functions | |
string_view (std::nullptr_t)=delete | |
constexpr | string_view (const char *p, std::size_t n) noexcept |
constexpr | string_view (const char *p, std::nothrow_t) noexcept |
string_view (const char *p) noexcept | |
string_view (const std::string &s) noexcept | |
constexpr std::size_t | size () const noexcept |
constexpr std::size_t | length () const noexcept |
constexpr const char * | data () const noexcept |
constexpr bool | empty () const noexcept |
void | swap (string_view &other) noexcept |
constexpr const char & | operator[] (std::size_t i) const noexcept |
const char & | at (std::size_t i) const |
const char * | begin () const noexcept |
const char * | cbegin () const noexcept |
const char * | end () const noexcept |
const char * | cend () const noexcept |
int | compare (const string_view &other) const noexcept |
int | compare (std::size_t pos, std::size_t count, string_view other) const noexcept |
bool | operator== (const string_view &other) const noexcept |
bool | operator!= (const string_view &other) const noexcept |
bool | operator< (const string_view &other) const noexcept |
bool | operator<= (const string_view &other) const noexcept |
bool | operator> (const string_view &other) const noexcept |
bool | operator>= (const string_view &other) const noexcept |
string_view | substr (std::size_t pos, std::size_t count=npos) const |
std::size_t | find (char c, std::size_t pos=0U) const noexcept |
std::size_t | find (const char *substr_p, std::size_t pos, std::size_t substr_n) const |
std::size_t | find (string_view substr, std::size_t pos=0U) const |
std::size_t | find_first_of (const char *chars, std::size_t pos, std::size_t chars_size) const noexcept |
std::size_t | find_first_of (string_view chars, std::size_t pos=0U) const noexcept |
std::size_t | find_first_not_of (char c, std::size_t pos=0U) const noexcept |
std::size_t | find_first_not_of (const char *chars, std::size_t pos, std::size_t chars_size) const noexcept |
std::size_t | find_first_not_of (string_view chars, std::size_t pos=0U) const noexcept |
std::size_t | find_last_of (const char *chars, std::size_t pos, std::size_t chars_size) const noexcept |
std::size_t | find_last_of (string_view chars, std::size_t pos=std::string::npos) const noexcept |
std::size_t | find_last_not_of (const char *chars, std::size_t pos, std::size_t chars_size) const noexcept |
std::size_t | find_last_not_of (string_view chars, std::size_t pos=std::string::npos) const noexcept |
std::size_t | rfind (char c, std::size_t pos=std::string::npos) const noexcept |
Static Public Member Functions | |
static constexpr std::size_t | strlen_imp (const char *p, std::size_t n=0U) noexcept |
Static Public Attributes | |
static constexpr std::size_t | npos = std::size_t(-1) |
A class like c++17's std::string_view.
There is an implicit conversion constructor from std::string since std::string has its convertion operator "operator sv()".
Definition at line 69 of file gstringview.h.
using G::string_view::const_iterator = const char * |
Definition at line 74 of file gstringview.h.
using G::string_view::difference_type = std::ptrdiff_t |
Definition at line 76 of file gstringview.h.
using G::string_view::iterator = const char * |
Definition at line 73 of file gstringview.h.
using G::string_view::size_type = std::size_t |
Definition at line 75 of file gstringview.h.
using G::string_view::traits = std::char_traits<char> |
Definition at line 72 of file gstringview.h.
using G::string_view::value_type = char |
Definition at line 77 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 82 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 83 of file gstringview.h.
|
inlinenoexcept |
Definition at line 84 of file gstringview.h.
|
inlinenoexcept |
Definition at line 85 of file gstringview.h.
|
inline |
Definition at line 92 of file gstringview.h.
|
inlinenoexcept |
Definition at line 93 of file gstringview.h.
|
inlinenoexcept |
Definition at line 94 of file gstringview.h.
|
inlinenoexcept |
Definition at line 96 of file gstringview.h.
|
inlinenoexcept |
Definition at line 97 of file gstringview.h.
|
inlinenoexcept |
Definition at line 101 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 88 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 89 of file gstringview.h.
|
inlinenoexcept |
Definition at line 95 of file gstringview.h.
|
noexcept |
Definition at line 92 of file gstringview.cpp.
std::size_t G::string_view::find | ( | const char * | substr_p, |
std::size_t | pos, | ||
std::size_t | substr_n | ||
) | const |
Definition at line 105 of file gstringview.cpp.
std::size_t G::string_view::find | ( | string_view | substr, |
std::size_t | pos = 0U |
||
) | const |
Definition at line 110 of file gstringview.cpp.
|
noexcept |
Definition at line 141 of file gstringview.cpp.
|
noexcept |
Definition at line 154 of file gstringview.cpp.
|
noexcept |
Definition at line 159 of file gstringview.cpp.
|
noexcept |
Definition at line 119 of file gstringview.cpp.
|
noexcept |
Definition at line 124 of file gstringview.cpp.
|
noexcept |
Definition at line 205 of file gstringview.cpp.
|
noexcept |
Definition at line 210 of file gstringview.cpp.
|
noexcept |
Definition at line 179 of file gstringview.cpp.
|
noexcept |
Definition at line 184 of file gstringview.cpp.
|
inlineconstexprnoexcept |
Definition at line 87 of file gstringview.h.
|
inlinenoexcept |
Definition at line 103 of file gstringview.h.
|
inlinenoexcept |
Definition at line 104 of file gstringview.h.
|
inlinenoexcept |
Definition at line 105 of file gstringview.h.
|
inlinenoexcept |
Definition at line 102 of file gstringview.h.
|
inlinenoexcept |
Definition at line 106 of file gstringview.h.
|
inlinenoexcept |
Definition at line 107 of file gstringview.h.
|
inlineconstexprnoexcept |
Definition at line 91 of file gstringview.h.
|
noexcept |
Definition at line 231 of file gstringview.cpp.
|
inlineconstexprnoexcept |
Definition at line 86 of file gstringview.h.
|
inlinestaticconstexprnoexcept |
Definition at line 81 of file gstringview.h.
G::string_view G::string_view::substr | ( | std::size_t | pos, |
std::size_t | count = npos |
||
) | const |
Definition at line 82 of file gstringview.cpp.
|
inlinenoexcept |
Definition at line 90 of file gstringview.h.
|
staticconstexpr |
Definition at line 78 of file gstringview.h.