Swift中格式化字符串,实现代码如下
let numberFormatter:NumberFormatter = NumberFormatter()
numberFormatter.minimumFractionDigits = a;
numberFormatter.maximumFractionDigits = a
numberFormatter.roundingMode = .floor
print("9888889====", numberFormatter.string(from: NSNumber(value: 199992.006584740 ) )! )