StrCharPtrAt
- Macro
- August 22, 2025
Table of Contents
StrCharPtrAt
StrCharPtrAt
Description
Get pointer to character at given index
Usage example (Cross-references)
- In
Str.Access.c:105
:
// Test StrCharPtrAt function
bool test_str_char_ptr_at(void) {
printf("Testing StrCharPtrAt\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Access.c:111
:
// Access character pointers at different indices
// Now using the fixed StrCharPtrAt macro
char* p0 = StrCharPtrAt(&s, 0);
char* p1 = StrCharPtrAt(&s, 1);
char* p2 = StrCharPtrAt(&s, 2);
- In
Str.Access.c:112
:
// Now using the fixed StrCharPtrAt macro
char* p0 = StrCharPtrAt(&s, 0);
char* p1 = StrCharPtrAt(&s, 1);
char* p2 = StrCharPtrAt(&s, 2);
char* p3 = StrCharPtrAt(&s, 3);
- In
Str.Access.c:113
:
char* p0 = StrCharPtrAt(&s, 0);
char* p1 = StrCharPtrAt(&s, 1);
char* p2 = StrCharPtrAt(&s, 2);
char* p3 = StrCharPtrAt(&s, 3);
char* p4 = StrCharPtrAt(&s, 4);
- In
Str.Access.c:114
:
char* p1 = StrCharPtrAt(&s, 1);
char* p2 = StrCharPtrAt(&s, 2);
char* p3 = StrCharPtrAt(&s, 3);
char* p4 = StrCharPtrAt(&s, 4);
- In
Str.Access.c:115
:
char* p2 = StrCharPtrAt(&s, 2);
char* p3 = StrCharPtrAt(&s, 3);
char* p4 = StrCharPtrAt(&s, 4);
// Check that the pointers are correct