map.put("RowID", String.valueOf(RowID));
map.put(KEY_NAME, parser.getValue(e, KEY_NAME));
解析后我正在获取数据
13/2012 | Section 10(15), item (h) of sub-clause (iv) of the Income-tax Act, 1961 - Exemptions - Interest on bonds/debentures - Notified bonds/debentures of Public Sector Companies - Corrigendum to notification no.7/2012, dated 14-2-2012
我想在 |
之后分开并像那样打印数据
13/2012 Section
10(15), item (h) of sub-clause (iv) of the Income-tax Act, 1961 - Exemptions - Interest on bonds/debentures - Notified bonds/debentures of Public Sector Companies - Corrigendum to notification no.7/2012, dated 14-2-2012
我该怎么做?
最佳答案
使用 String.replace()。
例如:
String s = "hello | world";
System.out.println(s.replace("|", "\n"));
打印出来:
你好
世界
关于java - 如何在字符串中的 "| "之后在新行中打印数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12815063/