You need to sign in to do that
Don't have an account?
Wizrad
Double -> Strings and preventing scientific notation
Hi all,
I see that if I use String.valueOf() or '' + on a Double that has 8 digits or more, it turns it into scientific notation.
Is there any way to prevent this? I see that a .format() works, but that adds commas. I can replace the commas with empty string, but this only works in my locale.
Am I really being forced to split on capital E, take the number after the E, and tack on the appropriate amount of zeros? There must be a better solution.
Thanks!
Ideally there would be a method like:
in the style of javadoc.
However, Apex doesn't have Object (or anything AFAIK) at the root of its object hierarchy, so the actual method that Apex has is
which is fairly useless. Hopefully someone can shed some light.