mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
stringutil added util::base64_encode/decode
This commit is contained in:
parent
32891ad156
commit
3cfdbc8338
2 changed files with 87 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define UTIL_STRINGUTIL_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../typedefs.h"
|
||||
|
||||
namespace util {
|
||||
|
|
@ -21,6 +22,10 @@ namespace util {
|
|||
extern void trim(std::string &s);
|
||||
|
||||
extern std::wstring to_wstring(double x, int precision);
|
||||
|
||||
extern std::string base64_encode(const ubyte* data, size_t size);
|
||||
extern std::vector<ubyte> base64_decode(const char* str, size_t size);
|
||||
extern std::vector<ubyte> base64_decode(const std::string& str);
|
||||
}
|
||||
|
||||
#endif // UTIL_STRINGUTIL_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue