So in my game the total points should be displayed as follows:

1000 -1 K

10000- 10 K

100000- 1 M

1000000000 -1 B

how can i achieve this ?

So in my game the total points should be displayed as follows:

1000 -1 K

10000- 10 K

100000- 1 M

1000000000 -1 B

how can i achieve this ?

Wow Thanks world like a charm. Although there is a slight problem where the number needs to be rounded up for example

1234 needs to be shown as 1.2 K . Any solution for this?

Thank you Pleox, worked like a charm