Number to Short Scale converter help

Greeting fellow developers!

Im creating a game that somewhat reminds me of Adventure Capitalist.
I got a label with the number 1.000.000.000.000 which turns out to be a huge label.
This number could be converted to its short scale name called 1 trillion.
So i had 57.310.000.000.000, it would convert it to 57.31 trillions

There are a lot of numbers for this short scale stuff:

I need a fast and efficient way of doing this :slight_smile:
Any tips for this?

Divide by thousand, take next name from that table, if result > 99 repeat, else you done.