Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
formatting number with commas
#10
Member function: str.AddCommasToNumbers

Code:
Copy      Help
function$
;Adds commas to large numbers.  
;Note: the number must become a string before sending to this funcion.


;str s="1234567.1234567"
;s.AddCommasToNumbers
;out s



strrev this
this.replacerx("(\d{3})(?=\d+($|[^\.\w]))" "$1,")
strrev this
An old blog on QM coding and automation.

The Macro Hook


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)