chickadee » srfi-214 » flexvector-copy

flexvector-copy fv #!optional start endprocedure

Allocates a new flexvector whose length is (- end start) and fills it with elements from fv, taking elements from fv starting at index start and stopping at index end. start defaults to 0 and end defaults to the value of (flexvector-length fv). flexvector-reverse-copy is the same, but copies the elements in reverse order from fv. Both start and end are clamped to the range [0, (flexvector-length fv)). It is an error if end is less than start. flexvector-copy shares the performance characteristics of vector-copy — in particular, if a given Scheme's vector-copy uses a fast memcpy operation instead of an element-by-element loop, flexvector-copy should also use this operation.