mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
UiXmlReader update
This commit is contained in:
parent
b38afe9e34
commit
4fd398844e
6 changed files with 103 additions and 46 deletions
|
|
@ -228,6 +228,14 @@ std::string util::base64_encode(const ubyte* data, size_t size) {
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
std::string util::mangleid(uint64_t value) {
|
||||
// todo: use base64
|
||||
std::stringstream ss;
|
||||
ss << std::hex << value;
|
||||
std::string result(ss.str());
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::vector<ubyte> util::base64_decode(const char* str, size_t size) {
|
||||
std::vector<ubyte> bytes((size/4)*3);
|
||||
ubyte* dst = bytes.data();
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace util {
|
|||
extern std::vector<ubyte> base64_decode(const char* str, size_t size);
|
||||
extern std::vector<ubyte> base64_decode(const std::string& str);
|
||||
|
||||
extern std::string mangleid(uint64_t value);
|
||||
|
||||
extern int replaceAll(std::string& str, const std::string& from, const std::string& to);
|
||||
|
||||
extern double parse_double(const std::string& str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue