How to shorten numbers (1,000,000 -> 1.00M, ...)

It’s in the title. Basically I want numbers to go like this:
1,000,000,000 → 1.00B
and so on

Question is how you wanna store that data (1.00M). With simple string you can use Dictionary<string,long> to convert from 1.00M to 1_000_000 as number. You can build some class with float (1.00) and string (M,B, etc.) and converter inside that class. You can use Regular Expressions for more fancy approach.
BTW, in C# you can write big numbers like this 1_000_000_000_000_000.