I am wondering if anyone has developed a function that acts the same was as format() in desktop applications that can be used in iOS? I am trying to figure out a generic method for reducing a number like 12,546 to 12500 as a text value in the same way that format() does.
Then workaround I have found for a single option is:
// double to integer
var initialdose as double = 9834
var initialHeparinDose as int64
initialHeparinDose = round(initialDose/100)*100 // convert double to integer = 9800
It would be. nice to have the full functionality of the desktop format() function available.