Skip to content
VecInsertRange

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)
                    }
    
                    VecInsertRange(vec, temp_strings, index, count);
    
                    // Clean up temp strings
                    }
    
                    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
    // 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
    // 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
    #define VecMustInsertRange(v, varr, idx, count)                                                                        \
        do {                                                                                                               \
            if (!VecInsertRange((v), (varr), (idx), (count))) {                                                            \
                LOG_FATAL("VecMustInsertRange failed");                                                                    \
            }                                                                                                              \
Last updated on