官术网_书友最值得收藏!

String interpolation

String interpolation is a way to construct a new String value from a mix of constants, variables, literals, and expressions by including their values inside a String literal. Consider the following example:

let multiplier = 3 
let message = "\(multiplier) times 7.5 is \(Double (multiplier) * 7.5)"
// message is "3 times 2.5 is 22.5"
主站蜘蛛池模板: 景东| 吕梁市| 治县。| 建水县| 曲松县| 长寿区| 双城市| 门源| 息烽县| 青阳县| 沙河市| 裕民县| 丽水市| 襄汾县| 聊城市| 长春市| 乐东| 普宁市| 土默特右旗| 镇江市| 崇州市| 宜宾市| 大新县| 岑巩县| 高邮市| 嵊泗县| 丽江市| 大名县| 彰化市| 和政县| 宁陕县| 宜宾县| 垦利县| 聊城市| 盐山县| 乳源| 双流县| 黄平县| 吴江市| 连南| 武冈市|