Luc*_*ack 4 html javascript dart
我需要在一个以 HTML 格式输出的字符串中中断;
String str = "Hello <br /> There";
Run Code Online (Sandbox Code Playgroud)
会输出:
Hello
There
Run Code Online (Sandbox Code Playgroud)
尝试
String str = "Hello\nThere";
Run Code Online (Sandbox Code Playgroud)
反而。
不过,可能需要将white-space: pre或white-space: pre-wrap应用于显示文本的元素的样式。
| 归档时间: |
|
| 查看次数: |
7516 次 |
| 最近记录: |