E-MailRelay
Static Public Member Functions | List of all members
G::Xtext Class Reference

An xtext codec class, encoding space as "+20" etc. More...

#include <gxtext.h>

Static Public Member Functions

static std::string encode (const std::string &)
 Encodes the given string. More...
 
static std::string decode (const std::string &)
 Decodes the given string. More...
 
static bool valid (const std::string &, bool strict=false)
 Returns true if a valid encoding. More...
 

Detailed Description

An xtext codec class, encoding space as "+20" etc.

See also
RFC-1891 section 5

Definition at line 36 of file gxtext.h.

Member Function Documentation

◆ decode()

std::string G::Xtext::decode ( const std::string &  s)
static

Decodes the given string.

Input strings must be un-strictly valid(), otherwise the result is undefined.

Definition at line 117 of file gxtext.cpp.

◆ encode()

std::string G::Xtext::encode ( const std::string &  s)
static

Encodes the given string.

Definition at line 95 of file gxtext.cpp.

◆ valid()

bool G::Xtext::valid ( const std::string &  s,
bool  strict = false 
)
static

Returns true if a valid encoding.

If strict then 'equals' and 'space' are disallowed and hex characters must be uppercase (eg. "+1A").

Definition at line 75 of file gxtext.cpp.


The documentation for this class was generated from the following files: