You do not append to anything, only overwrite it. There is no reallocation because
"aaa".length == "bbb".length.

I changed my code to:
  str_ptr.length +=1;
  str[] = "bbbb"[];

But now it's print length 4 before and after writing "bbb" to `str`. I expected that size will be 3+4=7.

Reply via email to