VecInsertRangeFast
- Macro
- October 8, 2025
Table of Contents
VecInsertRangeFast
VecInsertRangeFastDescription
Quickly insert array of items into vector. By default, this uses L-value semantics (ownership transfer). Ordering of elements is not guaranteed to be preserved. This call makes significant difference only for sufficiently large vectors and when idx is quite less than (v)->length. Insertion time is guaranteed to be constant for same data types.
Info
If copy_init is set, then vector will create it’s own copy of items.
Note
Ownership of items in array is transferred to vector if no copy_init method is set. This is to prevent multiple ownership of same object, once inserted into vector. Object won’t be usable after this call if copy_init is not set.
Parameters
| Name | Direction | Description |
|---|---|---|
v | in,out | Vector to insert item into |
val | in | Array of items to be inserted |
idx | in | Index to insert item at. |
count | in | Number of items to insert. |
Success
return
Failure
Does not return
Usage example (Cross-references)
- In
VecStr.c:376:
}
VecInsertRangeFast(vec, temp_strings, index, count);
VecDeinit(vec);
}
- In
VecCharPtr.c:406:
}
VecInsertRangeFast(vec, temp_strings, index, count);
// Clean up temp strings