Lines Matching full:suffix
96 // Return true if str ends in suffix.
98 // Given a string and a putative suffix, returns the string minus the
99 // suffix string if the suffix matches, otherwise the original
103 const string& suffix) {
104 return str.size() >= suffix.size() &&
105 str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
108 inline string StripSuffixString(const string& str, const string& suffix) {
109 if (HasSuffixString(str, suffix)) {
110 return str.substr(0, str.size() - suffix.size());