SmtpdSocket::EmailAddress Class Reference#include <SmtpdSocket.h>
Detailed DescriptionDefinition at line 55 of file SmtpdSocket.h. Constructor & Destructor Documentation
Definition at line 57 of file SmtpdSocket.h. 00058 { 00059 std::string str = str_in; 00060 size_t i = str.find("<"); 00061 if (i != std::string::npos) 00062 str = str.substr(i + 1); 00063 i = str.find("@"); 00064 if (i != std::string::npos) 00065 { 00066 m_name = str.substr(0, i); 00067 str = str.substr(i + 1); 00068 i = str.find(">"); 00069 if (i != std::string::npos) 00070 str = str.substr(0, i); 00071 m_domain = str; 00072 } 00073 while (m_name.size() && m_name[m_name.size() - 1] == ' ') 00074 m_name.resize(m_name.size() - 1); 00075 while (m_domain.size() && m_domain[m_domain.size() - 1] == ' ') 00076 m_domain.resize(m_domain.size() - 1); 00077 while (m_name.size() && m_name[0] == ' ') 00078 m_name = m_name.substr(1); 00079 while (m_domain.size() && m_domain[0] == ' ') 00080 m_domain = m_domain.substr(1); 00081 m_top = m_domain; 00082 { 00083 for (size_t i = 0; i < m_domain.size(); i++) 00084 { 00085 if (m_domain[i] == '.') 00086 { 00087 m_sub = m_top; 00088 m_top = m_domain.substr(i + 1); 00089 } 00090 } 00091 } 00092 }
Member Function Documentation
Member Data Documentation
Definition at line 102 of file SmtpdSocket.h.
Definition at line 103 of file SmtpdSocket.h.
Definition at line 104 of file SmtpdSocket.h.
Definition at line 105 of file SmtpdSocket.h.
The documentation for this class was generated from the following file: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.4.4