![]() |
SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
|
A reference to a null-terminated string. More...
#include <os.h>
Public Member Functions | |
basic_cstring_view (const Char *s) | |
Constructs a string reference object from a C string. More... | |
basic_cstring_view (const std::basic_string< Char > &s) | |
Constructs a string reference from an std::string object. More... | |
const Char * | c_str () const |
Returns the pointer to a C string. More... | |
A reference to a null-terminated string.
It can be constructed from a C string or std::string
.
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);
|
inline |
Constructs a string reference object from a C string.
|
inline |
Constructs a string reference from an std::string
object.
|
inline |
Returns the pointer to a C string.