【发布时间】:2012-06-02 18:06:15
【问题描述】:
我正在尝试Oracle's documentations 给出的示例。如该页面所示,java 文件为 here。现在有了这个 java 文件,我在同一目录中保留了一个 LabelsBundle.properties 文件。
# This is the default LabelsBundle.properties file
s1 = computer
s2 = disk
s3 = monitor
s4 = keyboard
似乎在读取值时不会忽略尾随空格,而忽略前导空格。
所以如果我希望前导空格在那里,我该怎么办?
换句话说,我需要做什么才能将s1的值读取为
computer
而不是
computer
?
【问题讨论】:
标签: java whitespace resourcebundle