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
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
g++ -g -std=c++20 -o zstring_test zstring_test.cpp -I.. -L.. -lCoreUtils
|
||||
g++ -g -std=c++20 -o mstring_test mstring_test.cpp -I.. -L.. -lCoreUtils
|
||||
g++ -g -std=c++20 -o mstring_test mstring_test.cpp -I.. -L.. -lCoreUtils -lb64
|
||||
g++ -o jstring_test jstring_test.cpp -I.. -L.. -lCoreUtils
|
||||
Binary file not shown.
@@ -95,8 +95,19 @@ int main(int argc, char **argv) {
|
||||
test28 = test29;
|
||||
std::cout << "int: " << test28 << std::endl;
|
||||
|
||||
coreutils::MString test30 = "ABCDEF";
|
||||
coreutils::MString test30 = "ABCDEF0123";
|
||||
std::cout << test30 << " to hex " << test30.toHex() << " from hex " << test30.toHex().fromHex() << std::endl;
|
||||
|
||||
std::cout << test30 << " to lower " << test30.toLower() << std::endl;
|
||||
|
||||
coreutils::MString test31 = "abcdef0123";
|
||||
std::cout << test31 << " to upper " << test31.toUpper() << std::endl;
|
||||
|
||||
coreutils::MString test32 = "This is a test of converting this string to base64";
|
||||
std::cout << test32 << " to base64 " << test32.toBase64() << std::endl;
|
||||
|
||||
coreutils::MString test33 = test32.toBase64();
|
||||
std::cout << test33 << " from base64 " << test33.fromBase64() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user