1

I'm having this string that in it have some arabic numbers that are causing some issues to my app. So what I need is to format(replace) the numbers to the original ones, like this:

//Arabic numbers:
http://example.com/mmm/michaeljackson/٠٠٣.mp3
//I want this to be converted like this:
http://example.com/mmm/michaeljackson/002.mp3

Right now I am doing this, but the string locale is staying the same

String.format(Locale.US, playlistSongs.get(playPosition).getLink())

Can someone help me solve this issue

Darko Petkovski
  • 3,892
  • 13
  • 53
  • 117
  • 10
    What you call arabic numbers are hindi numbers. What you call 'normal' numbers are arabic numbers. – Jihed Amine May 21 '15 at 17:23
  • `String` is immutable. Try this : `String result = String.format(Locale.US, playlistSongs.get(playPosition).getLink())` – Chetan Kinger May 21 '15 at 17:24
  • @JihedAmine as I have been told these are old arabic numbers - the guy who told me knows this - but lets focus on the issue here – Darko Petkovski May 21 '15 at 17:26
  • @ChetanKinger nope it doesnt work.. Im doing this `String result = String.format(Locale.US, playlistSongs.get(playPosition).getLink());` but link stays the same – Darko Petkovski May 21 '15 at 17:28
  • I tried to make it easy with this [light library](https://github.com/ALI-KH-Y/AnyNum). – YektaDev Apr 01 '19 at 10:55

0 Answers0