fmt::basic_cstring_view

A reference to a null-terminated string. It can be constructed from a C string or std::string.

Synopsis

Declared in <fmt/os.h>

template<typename Char>
class basic_cstring_view;

Description

You can use one of the following type aliases for common character types:

+---------------+-----------------------------+ | Type | Definition | +===+ | cstring_view | basic_cstring_view<char> | +---------------+-----------------------------+ | wcstring_view | basic_cstring_view<wchar_t> | +---------------+-----------------------------+

This class is most useful as a parameter type for functions that wrap C APIs.

Member Functions

NameDescription
basic_cstring_view [constructor]Constructors
c_str Returns the pointer to a C string.