PIByteArray getRange
This commit is contained in:
@@ -85,6 +85,8 @@ public:
|
||||
|
||||
PIByteArray(const PIByteArray & o): PIDeque<uchar>(o) {}
|
||||
|
||||
PIByteArray(const PIDeque<uchar> & o): PIDeque<uchar>(o) {}
|
||||
|
||||
PIByteArray(PIByteArray && o): PIDeque<uchar>(std::move(o)) {}
|
||||
|
||||
//! Constructs 0-filled byte array with size "size"
|
||||
@@ -116,6 +118,12 @@ public:
|
||||
//! Return resized byte array
|
||||
PIByteArray resized(uint new_size) const {PIByteArray ret(new_size); memcpy(ret.data(), data(), new_size); return ret;}
|
||||
|
||||
//! Return sub-array starts from "index" and has "count" or less bytes
|
||||
PIByteArray getRange(size_t index, size_t count) const {
|
||||
return PIDeque<uchar>::getRange(index, count);
|
||||
}
|
||||
|
||||
|
||||
//! Convert data to Base 64 and return this byte array
|
||||
PIByteArray & convertToBase64();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user