Class StringRef¶
Defined in File catch.hpp
Class Documentation¶
-
class
Catch
::
StringRef
¶ 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.
Public Types
-
using
size_type
= std::size_t¶
Public Functions
-
inline
StringRef
() noexcept¶
-
StringRef
(char const *rawChars) noexcept¶
-
inline
StringRef
(std::string const &stdString) noexcept¶
-
inline
~StringRef
() noexcept¶
-
operator std::string
() const¶
-
inline auto
empty
() const noexcept -> bool¶
-
auto
c_str
() const -> char const*¶
-
auto
currentData
() const noexcept -> char const*¶
-
using