# std.Io.Reader: fix delimiter bugs · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f661ab6c36c0366331451986a29ee14ac05fd8eb)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f661ab6c36c0366331451986a29ee14ac05fd8eb

Requested commit: f661ab6c36c0366331451986a29ee14ac05fd8eb

Commit: f661ab6c36c0366331451986a29ee14ac05fd8eb

Tree: a7ea8365f91c0dff9026558bbacd4e034f7fe72b

Author: mlugg

Committer: Andrew Kelley

## Message

```
std.Io.Reader: fix delimiter bugs

Fix `takeDelimiter` and `takeDelimiterExclusive` tossing too many bytes
(#25132)

Also add/improve test coverage for all delimiter and sentinel methods,
update usages of `takeDelimiterExclusive` to not rely on the fixed bug,
tweak a handful of doc comments, and slightly simplify some logic.

I have not fixed #24950 in this commit because I am a little less
certain about the appropriate solution there.

Resolves: #25132

Co-authored-by: Andrew Kelley <andrew@ziglang.org>

```

## Parents

- [9ea4d9aa3bc184a1be1199f3b519796d417c7765](https://git.cafe/gitcafe/zig/commit/9ea4d9aa3bc184a1be1199f3b519796d417c7765?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f661ab6c36c0366331451986a29ee14ac05fd8eb?format=markdown)
