VecPopFront
- Macro
- August 22, 2025
Table of Contents
VecPopFront
VecPopFront
Description
Pop item from vector front.
Parameters
Name | Direction | Description |
---|---|---|
v | in,out | Vector to pop item from. |
ptr | out | Popped item will be stored here. Make sure this has sufficient memory to store memcopied data. If no pointer is provided, then it’s equivalent to deleting item from last position. |
Usage example (Cross-references)
- In
Remove.h:40
:
/// FAILURE : Returns NULL otherwise.
///
#define StrPopFront(str, chr) VecPopFront((str), (chr))
///
- In
Vec.Remove.c:77
:
// Test VecPopFront function
bool test_vec_pop_front(void) {
printf("Testing VecPopFront\n");
// Create a vector of integers
- In
Vec.Remove.c:95
:
// Pop from the front
int popped;
VecPopFront(&vec, &popped);
// Check popped value
- In
Vec.Remove.c:109
:
// Pop again
VecPopFront(&vec, &popped);
// Check popped value