ListSwapItems
- Macro
- October 8, 2025
Table of Contents
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)
- In
ListInt.c:132
:
if (list->length > 1 && idx1 < list->length && idx2 < list->length) {
ListSwapItems(list, idx1, idx2);
}
break;