mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:37:36 +00:00
LibCore: Add AllocatingMemoryStream::offset_of
This commit is contained in:
parent
ecc202c59d
commit
156b6e83cd
3 changed files with 76 additions and 0 deletions
|
@ -60,6 +60,8 @@ public:
|
|||
|
||||
size_t used_buffer_size() const;
|
||||
|
||||
ErrorOr<Optional<size_t>> offset_of(ReadonlyBytes needle) const;
|
||||
|
||||
private:
|
||||
// Note: We set the inline buffer capacity to zero to make moving chunks as efficient as possible.
|
||||
using Chunk = AK::Detail::ByteBuffer<0>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue