Loading...
Searching...
No Matches
basic_cstring_view< Char > Class Template Reference
Detailed Descriptiontemplate<typename Char> class basic_cstring_view< Char > \rst A reference to a null-terminated string. It can be constructed from a C string or 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 to allow passing different types of strings to a function, for example:: template <typename... Args> std::string format(cstring_view format_str, const Args & ... args); format("{}", 42); format(std::string("{}"), 42); \endrst Constructor & Destructor Documentation◆ basic_cstring_view() [1/2]
template<typename Char >
◆ basic_cstring_view() [2/2]
template<typename Char >
Member Function Documentation◆ c_str()
template<typename Char >
Returns the pointer to a C string. Definition at line 119 of file os.h. References basic_cstring_view< Char >::data_. Member Data Documentation◆ data_
template<typename Char >
Definition at line 105 of file os.h. Referenced by basic_cstring_view< Char >::c_str().
|