function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
wintamutewintamute 

Integer format() documentation and options

Hi,

this is all the documentation has to say about Integer formatting:

Table 2. Integer Instance Methods
NameArgumentsReturn TypeDescription
format  StringReturns the integer as a string

Obviously, this isn't much. However, I noticed that the returned String changes depending on the users locale setting, e.g

Integer testInt = 1000;
String intStr = testInt.format();
intStr now is either 1,000 or 1.000, depending on the locale. (I only tested 2 settings).

This itself doesn't bother me, but it should be mentioned in the documenation.
What I would like to see though are formatting options like in Java, so I can surpress grouping seperators or have leading zeros and so on.

Thanks