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

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"
主站蜘蛛池模板: 淮北市| 棋牌| 余干县| 墨玉县| 施秉县| 新竹县| 宕昌县| 弥勒县| 孟州市| 方山县| 达日县| 远安县| 淳安县| 金沙县| 中阳县| 凭祥市| 广河县| 克东县| 庄浪县| 墨竹工卡县| 永顺县| 额尔古纳市| 闻喜县| 永嘉县| 乐山市| 天祝| 宁津县| 石林| 曲阳县| 江源县| 砀山县| 綦江县| 子长县| 景泰县| 博白县| 阿克| 陇南市| 贵溪市| 许昌市| 东台市| 行唐县|