string get_string(string res){

  //删除换行符

  int r = res.find('\r\n');
  while (r != string::npos)
  {
    if (r != string::npos)
    {
      res.replace(r, 1, "");
      r = res.find('\r\n');
    }
  }

  //删除所有空格

  res.erase(std::remove_if(res.begin(), res.end(), std::isspace), res.end());

  return res;

}


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案