VecInsertRange
Description
Insert a contiguous range of count elements at idx, preserving order and taking ownership of the source range when no deep-copy handler is configured. Default unsuffixed form aliasing to the L (ownership) variant. See VecInsertRangeL for the full SUCCESS/FAILURE contract.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
VecCharPtr.c:232:
}
VecInsertRange(vec, temp_strings, index, count);
// Clean up temp strings
- In
VecStr.c:248:
}
VecInsertRange(vec, temp_strings, index, count);
}
break; // This is more reliable after other operations
int arr[] = {100, 200, 300};
VecInsertRange(&vec, arr, 1, 3);
// Check vector length
- In
Vec.Insert.c:200:
// Test VecInsertRange function for inserting at a specific index
bool test_vec_push_arr(void) {
WriteFmt("Testing VecInsertRange at specific index\n");
// Create a vector of integers
- In
Vec.Insert.c:233:
// Test VecInsertRange function for inserting from another vector
bool test_vec_insert_range(void) {
WriteFmt("Testing VecInsertRange from another vector\n");
// Create a vector of integers
- In
Insert.h:691:
#define VecMustInsertRange(v, varr, idx, count) \
do { \
if (!VecInsertRange((v), (varr), (idx), (count))) { \
LOG_FATAL("VecMustInsertRange failed"); \
} \
Last updated on