如何在 ant 属性中放置换行符 [英] How to put a newline in ant property
本文介绍了如何在 ant 属性中放置换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这似乎不起作用:
<property name="foo" value="\n bar \n"/>
我在电子邮件(以纯文本形式发送)的正文中使用属性值:
I use the property value in the body of an e-mail message (which is sent as plain text):
<mail ...>
<message>some text${foo}</message>
我在电子邮件输出中得到文字\n".
and I get literal "\n" in the e-mail output.
推荐答案
这些都对我有用:
<property name="foo" value="bar${line.separator}bazz"/>
<property name="foo">bar
bazz2</property>
<property name="foo" value="bar bazz"/>
这篇关于如何在 ant 属性中放置换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文