llvm.org GIT mirror llvm / c9af366
Add StringRef::endswith git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78197 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 11 years ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
173173 return substr(0, Prefix.Length).equals(Prefix);
174174 }
175175
176 /// endswith - Check if this string ends with the given \arg Suffix.
177 bool endswith(const StringRef &Suffix) const {
178 return slice(size() - Suffix.Length, size()).equals(Suffix);
179 }
180
176181 /// @}
177182 };
178183