static std::string& trim(std::string &s)
{
long lSize;
if (s.empty())
{
return s;
}
do
{
lSize = (long)s.size();
s.erase(0,s.find_first_not_of(" "));
s.erase(0,s.find_first_not_of("\r\n"));
s.erase(0,s.find_first_not_of("\t"));
}while(s.size() < lSize);
do
{
lSize = s.size();
s.erase(s.find_last_not_of(" ") + 1);
s.erase(s.find_last_not_of("\r\n") + 1);
s.erase(s.find_last_not_of("\t") + 1);
}while((long)s.size() < lSize);
return s;
}string