playMaker

Author Topic: [SOLVED] Easy way of formatting string numbers?  (Read 3233 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
[SOLVED] Easy way of formatting string numbers?
« on: September 30, 2014, 12:12:35 AM »
Hello,

I have some int values like 10000000.  And I'm converting them to strings to display on my GUI Text components. (they're scores).

What's the easiest/best way of getting them formatted with commas inserted in the right places, e.g. 1,000,000?

(These scores could be any value between 0-100,000,000. )

« Last Edit: September 30, 2014, 10:45:58 AM by jess84 »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Easy way of formatting string numbers?
« Reply #1 on: September 30, 2014, 12:34:08 AM »
When you convert the int to a string, there is a format section of that action type n0

Easiest and best :)
« Last Edit: September 30, 2014, 12:37:08 AM by LampRabbit »

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Easy way of formatting string numbers?
« Reply #2 on: September 30, 2014, 10:45:34 AM »
Great, thanks. I had no idea about the formatting options!

(And i usually just use Format String, because it's an awesome action :) )