Class StringRef

Class Documentation

class 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.

Public Types

using size_type = std::size_t
using const_iterator = const char*

Public Functions

constexpr StringRef() noexcept = default
StringRef(char const *rawChars) noexcept
inline constexpr StringRef(char const *rawChars, size_type size) noexcept
inline StringRef(std::string const &stdString) noexcept
inline explicit operator std::string() const
bool operator==(StringRef const &other) const noexcept
inline bool operator!=(StringRef const &other) const noexcept
inline char operator[](size_type index) const noexcept
inline bool empty() const noexcept
inline size_type size() const noexcept
char const *c_str() const
StringRef substr(size_type start, size_type length) const noexcept
char const *data() const noexcept
inline bool isNullTerminated() const noexcept
inline const_iterator begin() const
inline const_iterator end() const