2 // This file is (C) 2004 Royce Mitchell III
3 // and released under the BSD & LGPL licenses
7 std::string
chomp ( const std::string
& s
)
10 const char* p2
= &s
[0] + s
.size();
11 while ( p2
> p
&& strchr("\r\n", p2
[-1]) )
13 return std::string ( p
, p2
-p
);