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. c_str() must return a null terminated string, however, and so the StringRef will internally take ownership (taking a copy), if necessary. In theory this ownership is not externally visible - but it does mean (substring) StringRefs should not be shared between threads.
|
static constexpr char const *const | s_empty |
|
Catch::StringRef::StringRef |
( |
| ) |
|
|
inlinenoexcept |
Catch::StringRef::StringRef |
( |
StringRef const & |
other | ) |
|
|
inlinenoexcept |
Catch::StringRef::StringRef |
( |
StringRef && |
other | ) |
|
|
inlinenoexcept |
Catch::StringRef::StringRef |
( |
char const * |
rawChars | ) |
|
|
noexcept |
Catch::StringRef::StringRef |
( |
char const * |
rawChars, |
|
|
size_type |
size |
|
) |
| |
|
inlinenoexcept |
Catch::StringRef::StringRef |
( |
std::string const & |
stdString | ) |
|
|
inlinenoexcept |
Catch::StringRef::~StringRef |
( |
| ) |
|
|
inlinenoexcept |
auto Catch::StringRef::c_str |
( |
| ) |
const -> char const * |
auto Catch::StringRef::currentData |
( |
| ) |
const -> char const * |
|
noexcept |
auto Catch::StringRef::empty |
( |
| ) |
const -> bool |
|
inlinenoexcept |
auto Catch::StringRef::isOwned |
( |
| ) |
const -> bool |
|
privatenoexcept |
auto Catch::StringRef::isSubstring |
( |
| ) |
const -> bool |
|
privatenoexcept |
auto Catch::StringRef::numberOfCharacters |
( |
| ) |
const -> size_type |
|
noexcept |
Catch::StringRef::operator std::string |
( |
| ) |
const |
auto Catch::StringRef::operator!= |
( |
StringRef const & |
other | ) |
const -> bool |
|
noexcept |
auto Catch::StringRef::operator== |
( |
StringRef const & |
other | ) |
const -> bool |
|
noexcept |
auto Catch::StringRef::operator[] |
( |
size_type |
index | ) |
const -> char |
|
noexcept |
auto Catch::StringRef::size |
( |
| ) |
const -> size_type |
|
inlinenoexcept |
void Catch::StringRef::swap |
( |
StringRef & |
other | ) |
|
|
noexcept |
void Catch::StringRef::takeOwnership |
( |
| ) |
|
|
private |
friend struct StringRefTestAccess |
|
friend |
char* Catch::StringRef::m_data |
|
private |
char const* Catch::StringRef::m_start |
|
private |
constexpr char const* const Catch::StringRef::s_empty |
|
staticprivate |