41 G_EXCEPTION( Error ,
tx(
"base64 encoding error") ) ;
47 static std::string
decode(
string_view ,
bool throw_on_invalid =
false ,
bool strict =
true ) ;
static std::string decode(string_view, bool throw_on_invalid=false, bool strict=true)
Decodes the given string.
static bool valid(string_view, bool strict=true)
Returns true if the string is a valid base64 encoding, possibly allowing for embedded newlines,...
static std::string encode(string_view, string_view line_break={})
Encodes the given string, optionally inserting line-breaks to limit the line length.
A class like c++17's std::string_view.
constexpr const char * tx(const char *p)
A briefer alternative to G::gettext_noop().