swift convert double to string code example Example: double to string swift let c: String = String(format: "%.1f", a) print("c: \(c)") // c: 1.5