I'm currently having to resort to this: `<strin...
# multiplatform
m
I'm currently having to resort to this:
<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
On Android you can use double quotes around the whole thing, like so:
<string name="doctor_evil_quote">"One 'million' dollars"</string>
. Does that work?
m
Thanks. It compiles but the double quotes show up in the string 😂
😅 1
m
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.