# std.mem.sliceTo: Return slice with sentinel from unbounded pointers · gitcafe/zig

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

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

Visibility: public

Requested revision: d86e8b7795a5b5c2403c6a07dc818bc1d8a5cda4

Requested commit: d86e8b7795a5b5c2403c6a07dc818bc1d8a5cda4

Commit: d86e8b7795a5b5c2403c6a07dc818bc1d8a5cda4

Tree: 229faf2f7183a1453f1fa1ef21cadeb70a6f3d48

Author: Jay Petacat

Committer: Andrew Kelley

## Message

```
std.mem.sliceTo: Return slice with sentinel from unbounded pointers

Commit dec1163fbb removed sentinels from the returned slice for C
pointers. Since C pointers have no bounds, we know that it'll keep
scanning until it finds `end` (or crash trying). The same is also true
of many-item pointers without a sentinel (e.g. `[*]T`), so I added
support for those too.

```

## Parents

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

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