Posted 25 June 2014 - 09:12 PM
Hello everyone!
I am trying to shorten a long number (e.g. 12 308 129 becomes 12.3M). I have read about the gsub functionality, but I was wondering, how do these iterators and patterns work?
EDIT: Or at least tell me what kind of iterator and pattern I would need to turn a number (in this case, divided by a million) with alot of decimals into a compact, 1 decimal number.
I am trying to shorten a long number (e.g. 12 308 129 becomes 12.3M). I have read about the gsub functionality, but I was wondering, how do these iterators and patterns work?
EDIT: Or at least tell me what kind of iterator and pattern I would need to turn a number (in this case, divided by a million) with alot of decimals into a compact, 1 decimal number.
Edited on 25 June 2014 - 09:54 PM