# bin/bytes-at Slice a byte string by byte offsets: `bytes[offset .. offset+len]`. With the length omitted, takes everything from `offset` to the end. This is the raw counterpart of codepoint-based `slice` / `$s(a..b)` and never re-aligns on UTF-8 boundaries. ## Syntax
[bin/bytes-at $bytes $offset ?$len]
## Parameters - `$bytes` — byte string to slice - `$offset` — 0-based start offset - `$len` — number of bytes to take (optional; defaults to the end) ## Examples
def msg [bin/bytes 1 2 3 4 5]
[crypto/hex-encode [bin/bytes-at $msg 1 3]]   # → "020304"
[crypto/hex-encode [bin/bytes-at $msg 3]]     # → "0405"
## Returns New byte string (a copy). A negative/out-of-bounds offset or an over-long length returns `%Err{:message}`. ## See Also `bin/bytes`, `bin/u8-at`, `bytes/len`, `bytes/slice`