| ▲ | tourist2d 19 hours ago | |
Your comment makes no sense. If it was designed for non-null terminated strings, why would it specifically pad after a null terminator? I looked up the actual reason for its inception: --- | ||
| ▲ | masklinn 16 hours ago | parent | next [-] | |
> If it was designed for non-null terminated strings, why would it specifically pad after a null terminator? Padded and terminated strings are completely different beasts. And the text you quote tells you black on white that strncpy deals in padded strings. | ||
| ▲ | bentley 17 hours ago | parent | prev [-] | |
“fixed-length name fields in structures such as directory entries” “the trailing null is unnecessary for a maximum-length field” That is a non–null terminated string. | ||