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)
- In
Str.Remove.c:158:
// Test StrDelete function
bool test_str_delete(void) {
WriteFmt("Testing StrDelete\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Str.Remove.c:165:
// Delete a character from the middle
StrDelete(&s, 2);
// Check that the character was deleted
- In
Str.Remove.c:171:
// Delete another character
StrDelete(&s, 1);
// Check that the character was deleted
Last updated on