You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
804 B
31 lines
804 B
#include "utils/str_cat.hpp" |
|
|
|
#include <fmt/format.h> |
|
|
|
namespace devilution { |
|
|
|
char *BufCopy(char *out, long long value) |
|
{ |
|
const fmt::format_int formatted { value }; |
|
std::memcpy(out, formatted.data(), formatted.size()); |
|
return out + formatted.size(); |
|
} |
|
char *BufCopy(char *out, unsigned long long value) |
|
{ |
|
const fmt::format_int formatted { value }; |
|
std::memcpy(out, formatted.data(), formatted.size()); |
|
return out + formatted.size(); |
|
} |
|
|
|
void StrAppend(std::string &out, long long value) |
|
{ |
|
const fmt::format_int formatted { value }; |
|
out.append(formatted.data(), formatted.size()); |
|
} |
|
void StrAppend(std::string &out, unsigned long long value) |
|
{ |
|
const fmt::format_int formatted { value }; |
|
out.append(formatted.data(), formatted.size()); |
|
} |
|
|
|
} // namespace devilution
|
|
|