我对NumberFormatter.string
可能返回零的可能情况只有一个好奇心的问题。
说我有下面的代码
let nf = NumberFormatter()
nf.numberStyle = .currency
nf.currencyCode = "USD"
let myVal = 100.23
let resultString: String? = nf.string(from: myVal as NSNumber)
resultString
在什么情况下会是零?
Apple文档:https://developer.apple.com/documentation/foundation/numberformatter/1418046-string