Refactoring basic_string_init_copy_substring() and basic_string_push_back().