This means that in the case of the inline string being at full capacity the last byte double dips as a null terminator and showing that there is no capacity left (another way of saying that the length of the string is 3).
In order for "full C-compat" I think the byte order has to be swapped as well. I am not sure how worth this endeavour is tbh.
The point is that on master we have:
Instead, with this PR we store the capacity minus the length as the last byte (and not the length itself) leading to:
This means that in the case of the inline string being at full capacity the last byte double dips as a null terminator and showing that there is no capacity left (another way of saying that the length of the string is 3).
In order for "full C-compat" I think the byte order has to be swapped as well. I am not sure how worth this endeavour is tbh.