static std::string& chomp(std::string& classname)
{
std::string chompedname;
chompedname.reserve(classname.size());
for( int i = 0 ; i < classname.size(); ++i )
{
if( classname[i] != ' ' )
{
chompedname.push_back(classname[i]);
}
}
classname.swap(chompedname);
return classname;
}
No comments:
Post a Comment