Skip to content

StrDelete

Description

Delete the character at idx; trailing characters shift one slot to the left. idx must lie in [0, length). See VecDelete for the full SUCCESS/FAILURE contract.

Usage example (Cross-references)

Usage examples (Cross-references)
    // Test StrDelete function
    bool test_str_delete(void) {
        WriteFmt("Testing StrDelete\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        // 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
Last updated on