Creates a raw buffer over the same memory as the given raw buffer slice, with the indices rebased to zero.
- Xcode 9.3+
- Swift Standard Library
The raw buffer slice to rebase.
The new buffer represents the same region of memory as the slice, but its indices start at zero instead of at the beginning of the slice in the original buffer. The following code creates
slice, a slice covering part of an existing buffer instance, then rebases it into a new
After this code has executed, the following are true:
.start Index == 0
rebased == slice[n]
rebased == buffer[n]
.count == slice .count