StrDelete
- Macro
- August 22, 2025
Table of Contents
StrDelete
StrDelete
Description
Delete char at given index
Success
return
Failure
Does not return
Usage example (Cross-references)
- In
Str.Remove.c:142
:
// Test StrDelete function
bool test_str_delete(void) {
printf("Testing StrDelete\n");
Str s = StrInitFromZstr("Hello");
- In
Str.Remove.c:147
:
// Delete a character from the middle
StrDelete(&s, 2);
// Check that the character was deleted
- In
Str.Remove.c:153
:
// Delete another character
StrDelete(&s, 1);
// Check that the character was deleted