您好,我正在处理一些 java .proeprties 文件。
我想知道a行末尾的“\”是什么意思,例如:
pay.checkPrint.shellfish=You need to be the target of feature. \
Features are setup. <a id="desclink" href="{0 }">Click here</a> to work.
是不是跟下面的一样?
pay.checkPrint.shellfish=You need to be the target of feature. Features are setup. <a id="desclink" href="{0 }">Click here</a> to work.
一分钱
最佳答案
这是一种转义结束行字符的简单方法。
来自Oracle ATG Programming Guide (我看到此链接也已在评论中链接):
A property value can span several lines if each line is terminated by a backslash (‘\’) character. For example:
targetCities=\ Detroit,\ Chicago,\ Los Angeles
This is equivalent to
targetCities=Detroit,Chicago,Los Angeles
(white space at the beginning of lines is ignored).
编辑:
正如@erickson 所建议的,我在答案中添加了 Properties
的权威规范。
关于java - java 属性文件中的 "\"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36142531/