copy NUL at the end of the string