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

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

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

Visibility: public

Requested revision: bf58b4e41990973a72ef49163abe63d41c966e23

Requested commit: bf58b4e41990973a72ef49163abe63d41c966e23

Commit: bf58b4e41990973a72ef49163abe63d41c966e23

Tree: 43cacbdf9ba9d128dc7f73b3c667c9c3b684a621

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

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

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