Modeller.convertToString


convertToString(input, [showAllDigits], [locale])

Converts the input number into a string, ready formatted for display The string will have been formatted using the current number of significant figures (modified using setDisplaySigFig or setDisplayDecimalPlaces) and is presented in engineering format, with the exponent, if any, modified to be an even mulitple of 3.

inputdouble or long The input number
showAllDigitsoptional boolean If true (the default), ignore the number of significant figures set using setDisplaySigFig or setDisplayDecimalPlaces, and instead show all available precision
localeoptional string If given the locale in which to make the conversion, examples are similar to those shown in the Windows international settings dialog: "English", "English_United Kingdom", "French", "French_Monaco" etc. The special value of "C" may be used to represent standard US English number formating If not given, the Windows locale at the time Modeller was launched will be used
Return valuestringThe output string

Back to Modeller

Back to Overview