ListEmpty
ListEmpty
Description
Check whether list has no items.
Parameters
| Name | Direction | Description |
|---|---|---|
l |
in | List to query. |
Success
true when list length is 0.
Failure
false
Usage example (Cross-references)
Usage examples (Cross-references)
- In
List.Access.c:14:
static bool test_list_len_empty(void) {
WriteFmt("Testing ListLen and ListEmpty\n");
typedef List(int) IntList;- In
List.Access.c:20:
bool result = (ListLen(&list) == 0);
result = result && ListEmpty(&list);
ListPushBackR(&list, 10);- In
List.Access.c:26:
result = result && (ListLen(&list) == 2);
result = result && !ListEmpty(&list);
ListClear(&list);- In
List.Access.c:30:
ListClear(&list);
result = result && (ListLen(&list) == 0);
result = result && ListEmpty(&list);
ListDeinit(&list);
Last updated on