如何在属性值末尾添加空格
label.my.answer=My Answer
我想在上述键的末尾故意添加空格(例如,我想在末尾有 2 个空格 "My Answer "
)
目前,java.util.ResourceBundle 功能对此进行了修剪检索值时的一段代码
label.my.answer=My Answer
I would like to add spaces deliberately at the end of the above key (e.g. I would like to have 2 spaces at the end "My Answer "
)
Currently the java.util.ResourceBundle functionality kind of trims this piece of code while retrieving the value
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
注意:带点的标识符通常表示名称的层次结构,而
my
不是层次结构级别。您肯定不会定义同名的 Java 类或 Java 包,对吗?Note: identifiers with dots usually represent a hierarchy of names, and
my
is not a hierarchy level. You would certainly not define a Java class or a Java package of that name, would you?还
Also