Avatar
@swift-5.4.3 import Foundation import CoreFoundation let numberFormatter: NumberFormatter = { let f = NumberFormatter() f.numberStyle = .decimal f.usesGroupingSeparator = true return f }() print(numberFormatter.string(from: .init(value: 1000))) (edited)