Check out example codes for "double to string swift". It will help you in understanding the concepts better.

Code Example 1

let c: String = String(format: "%.1f", a)

print("c: \(c)") // c: 1.5

Learn ReactJs, React Native from akashmittal.com