When buff_size
in a string is greater than length()
, the extra pad
is placed after the string. By adding a buffer_start
field to the
string, the string data could float anywhere in the buffer. This could
accelerate operations such as lstrip()
, cut()
, and insert()
and would be an interesting variation in certain applications. The drawbacks
are the loss of detach()
, extra space overhead per-string, and extra
complexity in the implementation of Str
.