+ self->text[self->size+1] = L'\0';
+ self->size = wcslen(self->text);
+}
+
+void cstring_expand_arr(cstring_t *self, wchar_t *x) {
+ if((self->size + wcslen(x) + 1) * sizeof(wchar_t) > self->alloc) {
+ self->alloc = ((self->size + wcslen(x) + 1) * sizeof(wchar_t));
+ if((self->text = realloc(self->text, self->alloc)) == NULL) {
+ fprintf(stderr, "%s\n", "cstring_expand_arr() failed to reallocate memory.");
+ exit(EXIT_FAILURE);
+ }
+ }
+ self->text = wcscat(self->text, x);
+ self->size = wcslen(self->text);
+ self->text[self->size+1] = L'\0';