#include <catch_amalgamated.hpp>
Public Types | |
using | size_type = std::size_t |
using | const_iterator = const char* |
Public Member Functions | |
constexpr | StringRef () noexcept=default |
StringRef (char const *rawChars) noexcept | |
constexpr | StringRef (char const *rawChars, size_type size) noexcept |
StringRef (std::string const &stdString) noexcept | |
operator std::string () const | |
auto | operator== (StringRef other) const noexcept -> bool |
auto | operator!= (StringRef other) const noexcept -> bool |
constexpr auto | operator[] (size_type index) const noexcept -> char |
bool | operator< (StringRef rhs) const noexcept |
constexpr auto | empty () const noexcept -> bool |
constexpr auto | size () const noexcept -> size_type |
constexpr StringRef | substr (size_type start, size_type length) const noexcept |
constexpr char const * | data () const noexcept |
constexpr const_iterator | begin () const |
constexpr const_iterator | end () const |
int | compare (StringRef rhs) const |
Static Public Attributes | |
static constexpr size_type | npos { static_cast<size_type>( -1 ) } |
Private Attributes | |
char const * | m_start = s_empty |
size_type | m_size = 0 |
Static Private Attributes | |
static constexpr char const *const | s_empty = "" |
Friends | |
std::string & | operator+= (std::string &lhs, StringRef rhs) |
std::ostream & | operator<< (std::ostream &os, StringRef str) |
std::string | operator+ (StringRef lhs, StringRef rhs) |
A non-owning string class (similar to the forthcoming std::string_view) Note that, because a StringRef may be a substring of another string, it may not be null terminated.
using Catch::StringRef::const_iterator = const char* |
using Catch::StringRef::size_type = std::size_t |
|
constexprdefaultnoexcept |
|
noexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexpr |
int Catch::StringRef::compare | ( | StringRef | rhs | ) | const |
Provides a three-way comparison with rhs
Returns negative number if lhs < rhs, 0 if lhs == rhs, and a positive number if lhs > rhs
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlineexplicit |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
friend |
|
friend |
|
private |
|
private |
|
staticconstexprprivate |