17 string::size_type pos = addr.find(
'@');
19 if (pos != string::npos) {
20 this->
local = addr.substr(0, pos);
21 this->
host = addr.substr(pos + 1);
22 }
else this->
local = addr;
28 string::size_type start = wholeaddress.find(
'<');
30 if (start != string::npos)
31 addr = wholeaddress.substr(start + 1);
37 if (start != string::npos)
38 name = wholeaddress.substr(0, start);
44 start = addr.find(
'@');
45 local = addr.substr(0, start);
46 host = addr.substr(start + 1);
Declaration of the Address class.
std::string toParenList(void) const
Address(const std::string &name, const std::string &addr)
Declaration of miscellaneous convertion functions.
std::string toImapString(const std::string &s_in)
void trim(std::string &s_in, const std::string &chars=" \t\r\n")