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

Code Example 1

let str = String(format:"%d, %f, %ld", INT_VALUE, FLOAT_VALUE, DOUBLE_VALUE)

let str = "\(INT_VALUE), \(FLOAT_VALUE), \(DOUBLE_VALUE)"

Learn ReactJs, React Native from akashmittal.com