| 77 | #if ! BRPC_WITH_GLOG |
| 78 | |
| 79 | static bool endsWith(const std::string& s1, const butil::StringPiece& s2) { |
| 80 | if (s1.size() < s2.size()) { |
| 81 | return false; |
| 82 | } |
| 83 | return memcmp(s1.data() + s1.size() - s2.size(), s2.data(), s2.size()) == 0; |
| 84 | } |
| 85 | static bool startsWith(const std::string& s1, const butil::StringPiece& s2) { |
| 86 | if (s1.size() < s2.size()) { |
| 87 | return false; |