In Swift, you can use the \() syntax to do string interpolation .
It has the following format:
"Your string literal \(variable_name )"
The following example shows how:
let myName = "hi" var strName = "My name is \(myName)" print(strName)
You can use this method to include a Double value in your string as shown here:
let radius = 3.45 var circumference = 2 * 3.14 * radius var strResult = "The circumference is \(circumference)" print(strResult)/*from w w w . ja v a2s . c o m*/