HoverRace
2.0
|
Classes | |
class | Lua |
Mark a string to be streamed out escaped for Lua. More... | |
class | PU |
class | PW |
class | UW |
Utility class for easy conversion of UTF-8 to wide strings. More... | |
class | WU |
Utility class for easy conversion of wide strings to UTF-8. More... | |
Functions | |
MR_DllDeclare void | Append (std::string &dest, const std::string &src, size_t len) |
Append a string onto another string with a specific maximum length. More... | |
MR_DllDeclare size_t | Assign (std::string &dest, const std::string &src, size_t len) |
Assign a UTF-8 string to another, with a maximum length. More... | |
std::ostream & | operator<< (std::ostream &os, const Lua &lua) |
OS::path_t | UP (const char *s=nullptr) noexcept |
OS::path_t | UP (const std::string &s) noexcept |
MR_DllDeclare wchar_t * | Utf8ToWide (const char *s) |
Convert a UTF-8 string to a wide string. More... | |
MR_DllDeclare char * | WideToUtf8 (const wchar_t *ws) |
Convert a wide string to a UTF-8 string. More... | |
OS::path_t | WP (const wchar_t *s=NULL) noexcept |
OS::path_t | WP (const std::wstring &s) noexcept |
void HoverRace::Util::Str::Append | ( | std::string & | dest, |
const std::string & | src, | ||
size_t | len | ||
) |
Append a string onto another string with a specific maximum length.
dest | The destination string. |
src | The string to append. |
len | The maximum length of the destination string, in code points. |
size_t HoverRace::Util::Str::Assign | ( | std::string & | dest, |
const std::string & | src, | ||
size_t | len | ||
) |
Assign a UTF-8 string to another, with a maximum length.
dest | The destination string. The contents will be replaced. |
src | The source string. |
len | The maximum length, in code points. |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
wchar_t * HoverRace::Util::Str::Utf8ToWide | ( | const char * | s | ) |
Convert a UTF-8 string to a wide string.
The caller must use OS::Free() on the result.
s | The UTF-8-encoded string (may not be NULL). |
char * HoverRace::Util::Str::WideToUtf8 | ( | const wchar_t * | ws | ) |
Convert a wide string to a UTF-8 string.
The caller must use OS::Free() on the result.
ws | The wide string (may not be NULL). |
|
inlinenoexcept |
|
inlinenoexcept |