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