我有一个字符串,其值必须在引号中。以下是我目前的文字:
text = "#{value1} has viewed your #{value2}"
我希望value2
在引号中。我想要:
text = ""#{value1} has viewed your "#{value2}""
我该如何实现?任何帮助将不胜感激。
答案 0 :(得分:5)
func mapView(mapView: GMSMapView, didTapOverlay overlay: GMSOverlay) {
/* Here we cast the GMSOverlay to be a GMSPolygon */
let overlay = overlay as! GMSPolygon
overlay.fillColor = UIColor.whiteColor()
/* Now the color of the polygon has changed on the map */
}
甚至:
text = %Q|#{value1} has viewed your "#{value2}"|
text = "#{value1} has viewed your \"#{value2}\""