Lines Matching refs:Slice
35 class Slice {
38 Slice() : data_(""), size_(0) {} in Slice() function
41 Slice(const char* d, size_t n) : data_(d), size_(n) {} in Slice() function
45 Slice(const std::string& s) : data_(s.data()), size_(s.size()) {} in Slice() function
50 Slice(std::string_view sv) : data_(sv.data()), size_(sv.size()) {} in Slice() function
55 Slice(const char* s) : data_(s) { size_ = (s == nullptr) ? 0 : strlen(s); } in Slice() function
59 Slice(const struct SliceParts& parts, std::string* buf);
117 int compare(const Slice& b) const;
120 bool starts_with(const Slice& x) const { in starts_with()
124 bool ends_with(const Slice& x) const { in ends_with()
130 size_t difference_offset(const Slice& b) const;
145 class PinnableSlice : public Slice, public Cleanable {
157 inline void PinSlice(const Slice& s, CleanupFunction f, void* arg1, in PinSlice()
167 inline void PinSlice(const Slice& s, Cleanable* cleanable) { in PinSlice()
176 inline void PinSelf(const Slice& slice) { in PinSelf()
232 SliceParts(const Slice* _parts, int _num_parts) in SliceParts()
236 const Slice* parts;
240 inline bool operator==(const Slice& x, const Slice& y) {
245 inline bool operator!=(const Slice& x, const Slice& y) { return !(x == y); }
247 inline int Slice::compare(const Slice& b) const { in compare()
260 inline size_t Slice::difference_offset(const Slice& b) const { in difference_offset()