Reputation: 2802
Just a little while ago, I was looking around on GitHub, and I found there were some double quotation marks beside the string value in some strings.xml just like this:
<string name="ClipMmi" msgid="6952821216480289285">"来电显示"</string>
In short I mean this
"来电显示"
For full example please click here.
I don't know what is the "" used for? Because if I remove the "" beside the string value (e.g. "来电显示" change to 来电显示), the output won't change any more, both "来电显示" and 来电显示 will print 来电显示 as the output.
So does the quotations make any sense here?
Upvotes: 1
Views: 773
Reputation: 7516
It makes sense on languages that are using simple quotes '
.
If simple quotes aren't escaped like this, \'
, Lint will detect an error.
Using double quotes at the start and at the end of a string value will allow you to omit these backslashes.
There may be other purposes I didn't discovered yet.
Upvotes: 5