mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
AK: Add an optional starting offset to CircularBuffer::offset_of
This parameter allows to start searching after an offset. For example, to resume a search. It is unfortunately a breaking change in API so this patch also modifies one user and one test.
This commit is contained in:
parent
34922c0cc0
commit
9a7accddb7
4 changed files with 57 additions and 9 deletions
|
@ -36,7 +36,7 @@ public:
|
|||
[[nodiscard]] size_t used_space() const;
|
||||
[[nodiscard]] size_t capacity() const;
|
||||
|
||||
Optional<size_t> offset_of(StringView needle, Optional<size_t> until = {}) const;
|
||||
Optional<size_t> offset_of(StringView needle, Optional<size_t> from = {}, Optional<size_t> until = {}) const;
|
||||
|
||||
void clear();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue