MCPcopy Create free account
hub / github.com/IoLanguage/io / UArray_replaceAnyCase_with_

Function UArray_replaceAnyCase_with_

libs/basekit/source/UArray_string.c:66–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void UArray_replaceAnyCase_with_(UArray *self, const UArray *a1,
67 const UArray *a2) {
68 long i;
69 size_t start = 0;
70 UArray visible = UArray_stackRange(self, start, self->size);
71
72 while ((i = UArray_findAnyCase_(&visible, a1)) != -1) {
73 size_t index = start + i;
74 UArray_removeRange(self, index, a1->size);
75 UArray_at_putAll_(self, index, a2);
76 start = index + a2->size;
77 visible = UArray_stackRange(self, start, self->size - start);
78 }
79
80 UArray_changed(self);
81}
82
83BASEKIT_API void UArray_remove_(UArray *self, const UArray *a1) {
84 UArray blank = UArray_stackAllocedEmptyUArray();

Callers 1

UArray_removeAnyCase_Function · 0.85

Calls 5

UArray_stackRangeFunction · 0.85
UArray_findAnyCase_Function · 0.85
UArray_removeRangeFunction · 0.85
UArray_at_putAll_Function · 0.85
UArray_changedFunction · 0.85

Tested by

no test coverage detected