mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-13 08:35:46 +00:00
Add StringRef::endswith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e15192b36b
commit
c9af366fc3
@ -174,6 +174,11 @@ namespace llvm {
|
||||
return substr(0, Prefix.Length).equals(Prefix);
|
||||
}
|
||||
|
||||
/// endswith - Check if this string ends with the given \arg Suffix.
|
||||
bool endswith(const StringRef &Suffix) const {
|
||||
return slice(size() - Suffix.Length, size()).equals(Suffix);
|
||||
}
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user