<string name="email_address_question">What\u0027s your email address?</string>
To show an apostrophe (') using composeResources strings.
Escaping the apostrophe using the usual \' displays both the backslash and the apostrophe as literal strings when used.
Has anyone found a better way of doing this?
j
Jacob Ras
02/19/2024, 1:58 PM
On Android you can use double quotes around the whole thing, like so:
Thanks. It compiles but the double quotes show up in the string 😂
😅 1
m
mattinger
02/20/2024, 7:48 PM
FWIW, this is an android string resources thing, not compose specifically. If you just put it in the strings.xml file without the backslash, the linter should immediately complain to you.
Right from the android documentation on string resources:
Copy code
A string, which can include styling tags. Beware that you must escape apostrophes and quotation marks.