memcpy the correct string length