Refactoring basic_string_copy for terminator problem.