| bytevector-copy(3scm) | Scheme Programmer's Manual | bytevector-copy(3scm) |
NAME
bytevector-copy - copy a bytevector
LIBRARY
(import (rnrs)) ;R6RS (import (rnrs bytevectors)) ;R6RS (import (scheme base)) ;R7RS
SYNOPSIS
(bytevector-copy bytevector) (bytevector-copy bytevector start) ;R7RS (bytevector-copy bytevector start end) ;R7RS
DESCRIPTION
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.
RETURN VALUES
Returns a bytevector with the length end - start.
EXAMPLES
(define a #u8(1 2 3 4 5)) (bytevector-copy a 2 4)) => #u8(3 4)
COMPATIBILITY
The R6RS version of this procedure only has the first argument.
ERRORS
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.
SEE ALSO
bytevector-copy!(3scm)
STANDARDS
R6RS, R7RS
AUTHORS
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.
| 2021-02-20 |