StrEnd
Description
Pointer one past the last character of the string. Suitable as an iteration sentinel for [begin, end) loops.
Parameters
| Name | Direction | Description |
|---|---|---|
str |
in | String to query. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
ProcMaps.c:198:
return false;
}
i64 n = FileRead(&f, StrEnd(&out->raw), CHUNK);
if (n < 0) {
LOG_ERROR("ProcMapsLoad: FileRead failed");- In
Str.Access.c:103:
// Test StrEnd function
bool test_str_end(void) {
WriteFmt("Testing StrEnd\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Str.Access.c:110:
// Get a pointer to one past the last character using StrEnd
char *end = StrEnd(&s);
// Check that the pointer addresses the NUL terminator one past
Last updated on