Skip to content
StrDeleteLastChar

StrDeleteLastChar

Description

Delete the last character of the string in place. See VecDeleteLast for the full SUCCESS/FAILURE contract.

Usage example (Cross-references)

Usage examples (Cross-references)
    // Test StrDeleteLastChar function
    bool test_str_delete_last_char(void) {
        WriteFmt("Testing StrDeleteLastChar\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        // Delete the last character
        StrDeleteLastChar(&s);
    
        // Check that the character was deleted
    
        // Delete another character
        StrDeleteLastChar(&s);
    
        // Check that the character was deleted
Last updated on