string formatter swift code example
Example 1: string.format swift
let str = String(format:"%d, %f, %ld", INT_VALUE, FLOAT_VALUE, DOUBLE_VALUE)
let str = "\(INT_VALUE), \(FLOAT_VALUE), \(DOUBLE_VALUE)"
Example 2: string interpolation swift 5
let age = 30
let name = "Jotaro"
print("Hello my name is \(name) and I'm \(age) years old")