https://kotlinlang.org logo
Title
n

ndv

03/16/2018, 2:41 PM
Hello, I have currency symbols stored by their HTML codes, and need to convert them in kotlin to the corresponding currency symbol, so
$ -> $
- any standard library capable of doing this or do I need to build a map myself? Thanks!
m

marstran

03/16/2018, 2:43 PM
24 is just the ascii code in hex right? I think you can just map it to
"\u0024"
.
h

hho

03/16/2018, 2:44 PM
Right, that's even easier.
n

ndv

03/16/2018, 2:44 PM
Thanks guys! I'll try this 👍
m

marstran

03/16/2018, 2:44 PM
There's
&nbsp
,
&gt
and so on as well though. It won't work with those.
n

ndv

03/16/2018, 2:45 PM
luckily I just need to parse currency symbols, so it might work. either way I'll be able to build something. was hoping there would be something that just works out of the box