escape dictionary key double quotes when doing println dictionary item in Swift

前端 未结 5 768
鱼传尺愫
鱼传尺愫 2020-11-30 08:51

I\'ve been playing around with Swift, and just came across an issue. I have the following Dictionary in:

var locations:Dictionary

        
5条回答
  •  悲哀的现实
    2020-11-30 09:00

    Swift doesn't accept quote in \(). Therefore you need to separate the one-line code into two.

    Here is a blog showing example for Chinese readers: http://tw.gigacircle.com/321945-1

提交回复
热议问题