void split(const string &str, vector<string> &res, const char pattern)
{
	istringstream is(str);
	string temp;
	while (getline(is, temp, pattern))
	{
		if (temp.length() != 0)
		{
			res.push_back(temp);
		}
	}
		
	return;
}


void trim(std::string &s) 
{ if (s.empty()) return; s.erase(0, s.find_first_not_of(" ")); s.erase(s.find_last_not_of(" ") + 1); }

  

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-08-16
  • 2022-12-23
相关资源
相似解决方案