#include <catch.hpp>
Public Types | |
| using | size_type = std::size_t |
Public Member Functions | |
| auto | c_str () const -> char const * |
| auto | currentData () const noexcept -> char const * |
| auto | empty () const noexcept -> bool |
| auto | numberOfCharacters () const noexcept -> size_type |
| operator std::string () const | |
| auto | operator!= (StringRef const &other) const noexcept -> bool |
| auto | operator= (StringRef const &other) noexcept -> StringRef & |
| auto | operator== (StringRef const &other) const noexcept -> bool |
| auto | operator[] (size_type index) const noexcept -> char |
| auto | size () const noexcept -> size_type |
| StringRef () noexcept | |
| StringRef (StringRef const &other) noexcept | |
| StringRef (StringRef &&other) noexcept | |
| StringRef (char const *rawChars) noexcept | |
| StringRef (char const *rawChars, size_type size) noexcept | |
| StringRef (std::string const &stdString) noexcept | |
| auto | substr (size_type start, size_type size) const noexcept -> StringRef |
| void | swap (StringRef &other) noexcept |
| ~StringRef () noexcept | |
Private Member Functions | |
| auto | isOwned () const noexcept -> bool |
| auto | isSubstring () const noexcept -> bool |
| void | takeOwnership () |
Private Attributes | |
| char * | m_data = nullptr |
| size_type | m_size |
| char const * | m_start |
Static Private Attributes | |
| static constexpr char const *const | s_empty = "" |
Friends | |
| struct | StringRefTestAccess |
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.
| using Catch::StringRef::size_type = std::size_t |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| auto Catch::StringRef::c_str | ( | ) | const -> char const * |
|
noexcept |
|
inlinenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
noexcept |
| Catch::StringRef::operator std::string | ( | ) | const |
|
noexcept |
|
inlinenoexcept |
|
noexcept |
|
private |
|
staticprivate |