mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
add a simple back() method to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -77,6 +77,11 @@ namespace llvm {
|
||||
/// size - Get the string size.
|
||||
size_t size() const { return Length; }
|
||||
|
||||
char back() const {
|
||||
assert(!empty());
|
||||
return Data[Length-1];
|
||||
}
|
||||
|
||||
/// equals - Check for string equality, this is more efficient than
|
||||
/// compare() in when the relative ordering of inequal strings isn't needed.
|
||||
bool equals(const StringRef &RHS) const {
|
||||
|
Reference in New Issue
Block a user