Re:Appending to an std:string character-by-character: how do...
by jltsiren on Friday October 27, 2023 @01:38AM
(#38035064)
That is the new allocation size. The new capacity is one character less. The allocation must include space for the trailing 0, which is not a part of the string and is hence not included in the length/capacity numbers.
[ Parent
| on HN ]
Re:Appending to an std:string character-by-character: how do...
by anonymoushn on Friday October 27, 2023 @02:27AM
(#38035309)
I see, thanks for your patience :)