42 { |
43 { |
43 return *(container.begin() + container.size() - 1); |
44 return *(container.begin() + container.size() - 1); |
44 } |
45 } |
45 |
46 |
46 using ByteArray = std::vector<unsigned char>; |
47 using ByteArray = std::vector<unsigned char>; |
47 class String quote(const ByteArray& bytes); |
48 std::string quote(const ByteArray& bytes); |
48 |
49 |
49 template<typename T> |
50 template<typename T> |
50 T splice(const T& container, int start, int end, int step = 1) |
51 T splice(const T& container, int start, int end, int step = 1) |
51 { |
52 { |
52 start = clamp(start, 0, static_cast<int>(container.size())); |
53 start = clamp(start, 0, static_cast<int>(container.size())); |