Quote:
Originally Posted by berni
hehe, not that easy to understand
the function is actually right, the comment is just wrong.
A size parameter isn't needed, since we we would never make the string bigger, it can only get shorter, that's why we take the max value of an unsigned integer.
|
Oh, I understand it, but it still makes me cringe. It is a bit of a bad practice. However I do see the point of not having another parameter that isn't really needed.