开发者

How can I write character ' in Android's strings.xml?

开发者 https://www.devze.com 2023-04-11 19:38 出处:网络
How do I repr开发者_StackOverflowesent the single-quote character (\') in strings.xml?From the Documentation:

How do I repr开发者_StackOverflowesent the single-quote character (') in strings.xml?


From the Documentation:

<string name="good_example">"This'll work"</string>
<string name="good_example_2">This\'ll also work</string>


You want to display "This'll work", You should be replace &#8217; instead of '. The following code as:

<string name="good_example">"This&#8217ll work"</string>


Character = Escaped form(s)

@ = @

? = \?

< = <

& = &

Single quote (') = Any of the following:

                    &apos;
                    \'

Double quote (") = Any of the following:

                 &quot;
                 \"

eg.> without character -- Any Customer's ATM & Debit Card.

correct answer or string-- Any Customer\'s ATM & Debit Card.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号