StrRemoveRange
Description
Remove count characters starting at start and optionally copy them into rd. Pass NULL for rd to discard. See VecRemoveRange for the full SUCCESS/FAILURE contract.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Str.Remove.c:103:
// Test StrRemoveRange function
bool test_str_remove_range(void) {
WriteFmt("Testing StrRemoveRange\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Str.Remove.c:114:
// Remove a range of characters
StrRemoveRange(&s, buffer, 5, 5);
// Check that the characters were removed correctly
- In
Str.Remove.c:121:
// Remove another range without storing it - use a temporary buffer instead of NULL
char ignored[2];
StrRemoveRange(&s, ignored, 4, 2);
// Check that the characters were removed
Last updated on