更新时间:2023-11-07 08:55:10
通过将\n"替换为\\n"并将\r"替换为\\r"来转义行结尾.您还需要转义单引号或双引号,具体取决于您用于分隔字符串的内容.
Escape line endings by replacing "\n" with "\\n" and "\r" with "\\r". You will also want to escape single or double quotes, depending on which you are using to delimit the string.