Is there an easy way and dynamic way to format numbers in a string to be human readable? For example turn 10000000000
into 10,000,000,000
. I have seen this question but the answers are outdated and broken (the one with the example).
Try this psuedo algorithm:
x
Loop over the string x
times, going backwards:
x
times 3 position, or index [(x times 3) - 1], we'll call it y
.y
with "," + y
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With