Esempio n. 1
0
	int getMonth(vmime::string mstr)
	{
		std::transform(mstr.begin(), mstr.end(), mstr.begin(), ::tolower);

		std::map <vmime::string, vmime::datetime::Months>::const_iterator
			c_it = m_monthMap.find(mstr);

		if (c_it != m_monthMap.end())
			return c_it->second;

		return -1;	
	}
	VMIME_TEST_LIST_END


	static const vmime::string extractComponentString
		(const vmime::string& buffer, const vmime::component& c)
	{
		return vmime::string(buffer.begin() + c.getParsedOffset(),
		                     buffer.begin() + c.getParsedOffset() + c.getParsedLength());
	}