3 ms·
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
by jltsiren 3y ago
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.
- anonymoushn 3y agoI see, thanks for your patience :)
- ace2358 3y agoGreat thread, I was scratching me head a bit too.