mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
add a simple back() method to StringRef.
llvm-svn: 78544
This commit is contained in:
parent
259a140521
commit
e024b843cd
@ -76,6 +76,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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user