I'm going to give it my best guess- it will copy up to n bytes, including the null byte if present in n, but not adding a null if the nth byte isn't a null, requiring you to set the last byte to 0 manually, whether that's allocating n+1 bytes or truncating the nth.