|
a/src/bincimapmime/address.cc |
|
b/src/bincimapmime/address.cc |
|
... |
|
... |
60 |
trim(addr, "<>");
|
60 |
trim(addr, "<>");
|
61 |
|
61 |
|
62 |
if (start != string::npos)
|
62 |
if (start != string::npos)
|
63 |
name = wholeaddress.substr(0, start);
|
63 |
name = wholeaddress.substr(0, start);
|
64 |
else
|
64 |
else
|
65 |
name = "";
|
65 |
name = string();
|
66 |
trim(name);
|
66 |
trim(name);
|
67 |
trim(name, "\"");
|
67 |
trim(name, "\"");
|
68 |
|
68 |
|
69 |
start = addr.find('@');
|
69 |
start = addr.find('@');
|
70 |
local = addr.substr(0, start);
|
70 |
local = addr.substr(0, start);
|
|
... |
|
... |
77 |
|
77 |
|
78 |
//------------------------------------------------------------------------
|
78 |
//------------------------------------------------------------------------
|
79 |
string Address::toParenList(void) const
|
79 |
string Address::toParenList(void) const
|
80 |
{
|
80 |
{
|
81 |
string tmp = "(";
|
81 |
string tmp = "(";
|
82 |
tmp += name == "" ? "NIL" : toImapString(name);
|
82 |
tmp += name.empty() ? "NIL" : toImapString(name);
|
83 |
tmp += " NIL ";
|
83 |
tmp += " NIL ";
|
84 |
tmp += local == "" ? "\"\"" : toImapString(local);
|
84 |
tmp += local.empty() ? "\"\"" : toImapString(local);
|
85 |
tmp += " ";
|
85 |
tmp += " ";
|
86 |
tmp += host == "" ? "\"\"" : toImapString(host);
|
86 |
tmp += host.empty() ? "\"\"" : toImapString(host);
|
87 |
tmp += ")";
|
87 |
tmp += ")";
|
88 |
|
88 |
|
89 |
return tmp;
|
89 |
return tmp;
|
90 |
}
|
90 |
}
|