Skip to content

ListSwapItems

ListSwapItems

Description

Swap items at given indices.

Parameters

Name Direction Description
l in,out List to swap items in.
idx1 in Index/Position of first item.
idx1 in Index/Position of second item.

Success

v on success

Failure

NULL

Usage example (Cross-references)

Usage examples (Cross-references)
    
                if (list->length > 1 && idx1 < list->length && idx2 < list->length) {
                    ListSwapItems(list, idx1, idx2);
                }
                break;
Last updated on