Returns whether str begins with prefix.
| 169 | |
| 170 | // Returns whether str begins with prefix. |
| 171 | inline bool HasPrefixString(const StringPiece& str, |
| 172 | const StringPiece& prefix) { |
| 173 | return str.starts_with(prefix); |
| 174 | } |
| 175 | |
| 176 | // Returns whether str ends with suffix. |
| 177 | inline bool HasSuffixString(const StringPiece& str, |