Hello!
in best case the new character is placed after the "." and the " " is shifted one position right.
None of the circular buffers I used so far performed any shifting. Maybe we are not talking about the
same thing.
char buf[32];
uint8 pos
Let's rewrite the buffer similarily as above. But lets rewrite @ instead of the 0. We are talking here
of an array of characters, not a string. If we put "This is an example." in the buffer, then it becomse
[This_is_an_example.@@@@@@@@@@@@@]
pos = 19
If I then push "This is another one" into it, it becomes:
[er_ones_an_example.This_is_anoth]
pos = 6
But nothing is shifted.
Similarily, if it's an array of 6 pointers to string:
"This"
"is"
"an"
"example."
0
0
The above should be understood as pointer to strings, i.e. each component
is a pointer (4 bytes for instance on an STM32) to the memory location containing each string.
would become after adding "This is another one":
"another"
"one"
"an"
"example."
"This"
"is"
but there would be no shift, no copy either
Dora.