StrDeleteLastChar
- Macro
- August 22, 2025
Table of Contents
StrDeleteLastChar
StrDeleteLastChar
Description
Delete last char from vec
Success
return
Failure
Does not return
Usage example (Cross-references)
- In
Str.Remove.c:120
:
// Test StrDeleteLastChar function
bool test_str_delete_last_char(void) {
printf("Testing StrDeleteLastChar\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Remove.c:125
:
// Delete the last character
StrDeleteLastChar(&s);
// Check that the character was deleted
- In
Str.Remove.c:131
:
// Delete another character
StrDeleteLastChar(&s);
// Check that the character was deleted