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


27.2.10 Selection

Function: subbytevector-s8 bv start past
Function: subbytevector-u8 bv start past

Build and return a new bytevector holding a copy of the subvector selected in bv.

Macro: subbytevector-s8* B
Macro: subbytevector-u8* B

Wrapper for subbytevector-u8 accepting a bytevector view as argument.

Function: %bytevector-s8-copy* bv start past
Function: %bytevector-u8-copy* bv start past
Macro: bytevector-s8-copy* B
Macro: bytevector-u8-copy* B

The function %bytevector-u8-copy* is an alias for subbytevector-u8; the macro bytevector-u8-copy* is an alias for subbytevector-u8*.

These exist for symmetry with the (vicare containers vectors) library; they allow more confidence in converting a vector function into a bytevector function, and vice versa, by just replacing the string vector in the function names with the string bytevector-u8, and vice versa.

Function: %bytevector-s8-reverse-copy* bv start past
Function: %bytevector-u8-reverse-copy* bv start past
Macro: bytevector-s8-reverse-copy* B
Macro: bytevector-u8-reverse-copy* B

Like %bytevector-u8-copy*, but copy the elements in the reverse order from the selected subvector.

Function: %bytevector-s8-copy*! dst-bv dst-start src-bv src-start src-past
Function: %bytevector-u8-copy*! dst-bv dst-start src-bv src-start src-past
Macro: bytevector-s8-copy*! dst-S src-S
Macro: bytevector-u8-copy*! dst-S src-S

Write the selected source subvector into the selected destination subvector. This function is the side–effecting variant of subbytevector-u8 and subbytevector-u8*. This function supports copying over the same bytevector.

The selected destination subvector starts at dst-start in dst-bv and may extend until the end of the bytevector. In the destination bytevector view dst-S: if a past index is specified, it is ignored.

Function: %bytevector-s8-reverse-copy*! dst-bv dst-start src-bv src-start src-past
Function: %bytevector-u8-reverse-copy*! dst-bv dst-start src-bv src-start src-past
Macro: bytevector-s8-reverse-copy*! B-dst B-src
Macro: bytevector-u8-reverse-copy*! B-dst B-src

Like %bytevector-u8-copy*!, but this copies the elements in the reverse order. This function supports copying over the same bytevector.

Function: %bytevector-s8-take nbytes bv start past
Function: %bytevector-u8-take nbytes bv start past
Function: %bytevector-s8-take-right nbytes bv start past
Function: %bytevector-u8-take-right nbytes bv start past
Macro: bytevector-s8-take B nbytes
Macro: bytevector-u8-take B nbytes
Macro: bytevector-s8-take-right B nbytes
Macro: bytevector-u8-take-right B nbytes

Return the first or last nbytes of the selected subvector. These functions always return a newly allocated bytevector.

Function: %bytevector-s8-drop nbytes bv start past
Function: %bytevector-u8-drop nbytes bv start past
Function: %bytevector-s8-drop-right nbytes bv start past
Function: %bytevector-u8-drop-right nbytes bv start past
Macro: bytevector-s8-drop B nbytes
Macro: bytevector-u8-drop B nbytes
Macro: bytevector-s8-drop-right B nbytes
Macro: bytevector-u8-drop-right B nbytes

Drop the first or last nbytes of the selected subvector and return the resulting bytevector. These functions always return a newly allocated bytevector.


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