News for hackers. Stuff that matters.
Re:The Sad State of C Strings by hyc_symas on Friday February 12, 2016 @08:55AM (#11087133)
Added to POSIX is good, but not sufficient. E.g., there is no reason for Windows to implement a function merely because it's in the POSIX spec. It needs to be in the C spec to actually be viable.

stpncpy is equivalent to strncpy - it NUL-pads dest if the src is shorter than N. Frankly I have never found a use for this behavior. The desired behavior is to simply copy src without additional padding. That is what my proposed strecopy() does, and that's what would be required of a replacement for strlcpy().

There are no comments on this comment yet.