UiXmlReader update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user