template<
typename Char>
class fmt::BasicStringRef< Char >
\rst A string reference. It can be constructed from a C string or std::basic_string
.
You can use one of the following typedefs for common character types:
+---------—+----------------------—+ | Type | Definition | +============+=========================+ | StringRef | BasicStringRef<char> | +---------—+----------------------—+ | WStringRef | BasicStringRef<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(StringRef format_str, const Args & ... args);
format("{}", 42); format(std::string("{}"), 42); \endrst
Definition at line 537 of file format.h.