| 70 | } |
| 71 | |
| 72 | inline std::string StringRemoveSuffix(const StringPiece& str, const StringPiece& suffix) |
| 73 | { |
| 74 | if (StringEndsWith(str, suffix)) |
| 75 | { |
| 76 | return str.substr(0, str.size() - suffix.size()).as_string(); |
| 77 | } |
| 78 | return str.as_string(); |
| 79 | } |
| 80 | |
| 81 | inline bool StringRemoveSuffix(std::string* str, const StringPiece& suffix) |
| 82 | { |