diff --git a/include/leveldb/slice.h b/include/leveldb/slice.h index 37cb821..e97223a 100644 --- a/include/leveldb/slice.h +++ b/include/leveldb/slice.h @@ -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 {