Helper template for getting zero-terminated strings from string spans. More...
#include <eagine/string_span.hpp>
Public Member Functions | |
constexpr auto | c_str () const noexcept -> pointer_type |
Return a zero terminated C-string as pointer_type. | |
constexpr | operator pointer_type () const noexcept |
Implicit conversion to character pointer_type. More... | |
Helper template for getting zero-terminated strings from string spans.
String spans can in many cases internally know if the element past the end is zero or not. There are cases where string spans or generally spans are not zero terminated. Because of this whenever a zero-terminated C-string is used, for example as an argument to a C-API call, instantiations of this template should be used the obtain a valid C-string.
|
inlineconstexprnoexcept |
Implicit conversion to character pointer_type.