StrCharPtrAt
- Macro
- October 8, 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) {
WriteFmt("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
- In
Str.c:136
:
if (VecLen(str) > 0 && *offset + 2 <= size) {
size_t idx = extract_u16(data, offset, size) % VecLen(str);
char *ptr = StrCharPtrAt(str, idx);
(void)ptr; // Suppress unused variable warning
}