omni::structuredlog::BasicStringView¶
Defined in omni/structuredlog/StringView.h
Inheritance Relationships¶
Base Type¶
public carb::cpp17::basic_string_view< CharT, std::char_traits< CharT > >
-
template<class
CharT
, classTraits
= std::char_traits<CharT>>
classomni::structuredlog
::
BasicStringView
: public carb::cpp17::basic_string_view<CharT, std::char_traits<CharT>>¶ An extension of carb::cpp17::basic_string_view that can handle nullptr and
std::basic_string
as inputs.- tparam CharT
The char type pointed to by the view.
- tparam Traits
The type traits for
CharT
.
Public Functions
-
inline constexpr
BasicStringView
()¶
-
inline constexpr
BasicStringView
(const CharT *s)¶ Create a string view from a C string.
- Parameters
s – [in] The C string to create a view into. This original pointer continues to be used and nothing is copied.
-
inline constexpr
BasicStringView
(const CharT *s, size_t len)¶ Create a string view from a char buffer.
- Parameters
s – [in] The char buffer to create a view into. This does not need to be null terminated. This original pointer continues to be used and nothing is copied.
len – [in] The length of the view into
s
, in characters.
-
constexpr
BasicStringView
(const BasicStringView &other) noexcept = default¶ Create a string view from another string view.
- Parameters
other – [in] The other string view to create this string view from.