StrDelete

Table of Contents

StrDelete

Description

Delete char at given index

Success

return

Failure

Does not return

Usage example (Cross-references)

    // Test StrDelete function
    bool test_str_delete(void) {
    printf("Testing StrDelete\n");
    
    Str s = StrInitFromZstr("Hello");
    
    // Delete a character from the middle
    StrDelete(&s, 2);
    
    // Check that the character was deleted
    
    // Delete another character
    StrDelete(&s, 1);
    
    // Check that the character was deleted

Share :