added b64 encode/decode to MString.
This commit is contained in:
1 parent
d1c450fe48
commit
5e6d162a05
8 files changed
+61
-35
No files matched your search
+7
-6
@@ -2,6 +2,7 @@
|
||||
#include "Log.h"
|
||||
#include "uuid/uuid.h"
|
||||
#include "Exception.h"
|
||||
#include "Base64.h"
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <format>
|
||||
@@ -365,21 +366,21 @@ namespace coreutils {
|
||||
}
|
||||
|
||||
MString MString::toBase64() {
|
||||
MString target;
|
||||
return target;
|
||||
Base64 b64;
|
||||
return b64.encode(*this);
|
||||
}
|
||||
|
||||
|
||||
MString MString::fromBase64() {
|
||||
MString target;
|
||||
return target;
|
||||
Base64 b64;
|
||||
return b64.decode(*this);
|
||||
}
|
||||
|
||||
|
||||
MString MString::toUpper() {
|
||||
MString target;
|
||||
for(int ix = 0; ix < length; ++ix)
|
||||
write(std::toupper(data[ix]));
|
||||
target.write(std::toupper(data[ix]));
|
||||
return target;
|
||||
}
|
||||
|
||||
@@ -387,7 +388,7 @@ namespace coreutils {
|
||||
MString MString::toLower() {
|
||||
MString target;
|
||||
for(int ix = 0; ix < length; ++ix)
|
||||
write(std::tolower(data[ix]));
|
||||
target.write(std::tolower(data[ix]));
|
||||
return target;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user