Next: , Previous: , Up: syslib bytevectors   [Index]


12.17.6 Copying

For these operations, the arguments have the following meaning:

src.bv

The source bytevector.

src.start

A non–negative fixnum representing the inclusive start index in the source bytevector src.bv.

src.end

A non–negative fixnum representing the exclusive end index in the source bytevector src.bv.

dst.bv

The destination bytevector.

dst.start

A non–negative fixnum representing the inclusive start index in the destination bytevector dst.bv.

dst.end

A non–negative fixnum representing the exclusive end index in the destination bytevector src.bv.

Function: $bytevector-copy bv

Build and return a copy of the bytevector bv.

Function: $bytevector-copy! src.bv src.start dst.bv dst.start src.end

Copy the bytes of src.bv from src.start inclusive to src.end exclusive, to dst.bv starting at dst.start inclusive.

Function: $bytevector-copy!/count src.bv src.start dst.bv dst.start count

Copy count bytes from src.bv starting at src.start inclusive to dst.bv starting at dst.start inclusive.

Function: $bytevector-self-copy-forwards!/count bv src.start dst.start count

Copy count bytes of bv from src.start inclusive to bv itself starting at dst.start inclusive. The copy happens forwards, so it is suitable for the case:

src.start > dst.start
Function: $bytevector-self-copy-backwards!/count bv src.start dst.start count

Copy count bytes of bv from src.start inclusive to bv itself starting at dst.start inclusive. The copy happens backwards, so it is suitable for the case:

src.start < dst.start