std::string 去除前后空格 ```cpp // 去除前后空格 std::string str = " hello "; str.erase(type.find_last_not_of(' ') + 1); str.erase(0, type.find_first_not_of(' '));