diff options
author | Victor Costan <costan@google.com> | 2025-01-30 09:32:59 -0800 |
---|---|---|
committer | Victor Costan <costan@google.com> | 2025-01-30 09:32:59 -0800 |
commit | ac691084fdc5546421a55b25e7653d450e5a25fb (patch) | |
tree | 5ceb2f8c7a6aa12d3aad31ca4e001174143a90ae /include | |
parent | e829478c6a3a55d8e5c1227e2678dcc18d518609 (diff) | |
parent | 4ee78d7ea98330f7d7599c42576ca99e3c6ff9c5 (diff) | |
download | leveldb-main.tar.gz leveldb-main.zip |
PiperOrigin-RevId: 721407764
Diffstat (limited to 'include')
-rw-r--r-- | include/leveldb/slice.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 { |