mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +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:
@ -174,6 +174,11 @@ namespace llvm {
|
|||||||
return substr(0, Prefix.Length).equals(Prefix);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user