| 40 | */ |
| 41 | |
| 42 | inline void trimRight(std::string& str,const char *trimChars=defaultTrimChars) { |
| 43 | |
| 44 | std::string::size_type pos; |
| 45 | |
| 46 | if((pos=str.find_last_not_of(trimChars))==std::string::npos) |
| 47 | str.clear(); |
| 48 | else if(pos!=str.size()-1) |
| 49 | str=str.substr(0,pos+1); |
| 50 | } |
| 51 | |
| 52 | |
| 53 | /** |
no test coverage detected