我想用“\n”替换换行符,但我的代码不起作用。
str.replaceAll("\n","\n"));
预期:“Hello\n World”
实际:
“你好
世界”
相关文章:
python - 如何更改 Rstudio 中的默认 python 版本/路径
reactjs - 如何在 ant design 的模态页脚上添加另一个按钮?
python - MacOS 构建问题 lstdc++ not found while buildi
python - Django createsuperuser 抛出 django.core.exc
java - 修复 Java newInstance() 已弃用
php - Yii2:如何禁用或只读 Select2 小部件?
angular - 如何清除 Angular react 形式的 FormArray 值?