VecEnd
Description
Pointer one past the last element of the vector. Suitable as an iteration sentinel for [begin, end) loops.
Parameters
| Name | Direction | Description |
|---|---|---|
v |
in | Vector to query. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
VecCharPtr.c:384:
case VEC_CHAR_PTR_END : {
if (VecLen(vec) > 0) {
char **end = VecEnd(vec);
(void)end; // Use the result to avoid warnings
}- In
VecStr.c:372:
case VEC_STR_END : {
if (VecLen(vec) > 0) {
Str *end = VecEnd(vec);
(void)end; // Use the result to avoid warnings
}- In
VecInt.c:318:
case VEC_INT_END : {
volatile void *end_ptr = VecEnd(vec);
(void)end_ptr;
break;- In
Vec.Access.c:135:
// Test VecBegin and VecEnd functions
bool test_vec_begin_end(void) {
WriteFmt("Testing VecBegin and VecEnd\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Vec.Access.c:150:
// Get begin and end pointers
int *begin = VecBegin(&vec);
char *end = (char *)VecEnd(&vec);
// Check that begin points to the first element
- In
Access.h:98:
/// TAGS: Str, Access, Iterator, End
///
#define StrEnd(str) VecEnd(str)
///
Last updated on