Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ToBase64.h" // string, experimental/string_view
- using std::length_error; // stdexcept
- using std::string; // string
- using std::experimental::string_view; // experimental/string_view
- using std::uint8_t; // cinttypes
- using namespace std;
- string to_base64(const string_view input)
- string to_base64(const string_view input);
- string to_base64(string_view input);
- auto remainder{ 0 };
- uint8_t leftover{ 0 };
- auto remainder = 0;
- auto leftover = uint8_t(0);
- int remainder = 0;
- uint8_t leftover = 0;
- switch ((remainder %= 3)++)
- output += "==";
- // ...
- output += '=';
- output += "==n";
- // ...
- output += '=n'; // oops
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement