Lines Matching refs:Slice
40 class Slice {
42 Slice() = default;
45 Slice(void* base, void* limit) : mBase(toUint8(base)), mLimit(toUint8(limit)) {} in Slice() function
48 Slice(void* base, size_t size) : Slice(base, toUint8(base) + size) {} in Slice() function
71 inline const Slice makeSlice(const T& ref) { in makeSlice()
78 inline const Slice makeSlice(const std::string& s) { in makeSlice()
85 inline const Slice makeSlice(const std::vector<T>& v) { in makeSlice()
91 inline const Slice makeSlice(const std::array<U, V>& a) { in makeSlice()
96 inline std::pair<const Slice, const Slice> split(const Slice s, size_t cut) { in split()
102 inline const Slice take(const Slice s, size_t cut) { in take()
107 inline const Slice drop(const Slice s, size_t cut) { in drop()
112 inline size_t copy(const Slice dst, const Slice src) { in copy()
120 inline size_t extract(const Slice src, Head& head) { in extract()
128 inline size_t extract(const Slice src, Head& head, Tail&... tail) { in extract()
134 std::string toString(const Slice s);
138 std::string toHex(const Slice s, int wrap = INT_MAX);
140 inline bool operator==(const Slice& lhs, const Slice& rhs) {
144 inline bool operator!=(const Slice& lhs, const Slice& rhs) {
148 std::ostream& operator<<(std::ostream& os, const Slice& slice);
152 inline const Slice findFirstMatching(const Slice s, uint8_t c) { in findFirstMatching()
154 if (!match) return Slice(); in findFirstMatching()