StrLast
- Macro
- August 22, 2025
Table of Contents
StrLast
StrLast
Description
Access last character in string
Usage example (Cross-references)
- In
Str.Access.c:36
:
// Test StrLast function
bool test_str_last(void) {
printf("Testing StrLast\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Access.c:41
:
// Get the last character
char last = StrLast(&s);
// Check that the character is correct