bytevector-copy - copy a bytevector
(import (rnrs)) ;R6RS
(import (rnrs bytevectors)) ;R6RS
(import (scheme base)) ;R7RS
(bytevector-copy bytevector)
(bytevector-copy bytevector start) ;R7RS
(bytevector-copy bytevector start end) ;R7RS
Returns a newly allocated bytevector containing the bytes in bytevector
between start (inclusive) and end (exclusive).
The default value for start is 0 and the default value for
end is equal to the length of the input.
Returns a bytevector with the length end - start.
(define a #u8(1 2 3 4 5))
(bytevector-copy a 2 4))
=> #u8(3 4)
The R6RS version of this procedure only has the first argument.
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
- The wrong number of arguments was passed or an argument was outside its
domain.
- R7RS
- The assertions described above are errors. Implementations may signal an
error, extend the procedure's domain of definition to include such
arguments, or fail catastrophically.