mirror of
https://github.com/google/leveldb.git
synced 2024-12-24 03:40:11 +08:00
Merge pull request #1202 from pkasting/main
[jumbo] Add begin()/end() to Slice.
This commit is contained in:
commit
23e35d792b
@ -51,6 +51,9 @@ class LEVELDB_EXPORT Slice {
|
||||
// Return true iff the length of the referenced data is zero
|
||||
bool empty() const { return size_ == 0; }
|
||||
|
||||
const char* begin() const { return data(); }
|
||||
const char* end() const { return data() + size(); }
|
||||
|
||||
// Return the ith byte in the referenced data.
|
||||
// REQUIRES: n < size()
|
||||
char operator[](size_t n) const {
|
||||
|
Loading…
Reference in New Issue
Block a user