Whats the most efficient way of removing a \'newline\' from a std::string?
Here is one for DOS or Unix new line:
void chomp( string &s) { int pos; if((pos=s.find('\n')) != string::npos) s.erase(pos); }