You need to sign in to do that
Don't have an account?
wintamute
Integer format() documentation and options
Hi,
this is all the documentation has to say about Integer formatting:
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
this is all the documentation has to say about Integer formatting:
Name | Arguments | Return Type | Description |
---|---|---|---|
format | String | Returns 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