2015/02/13

Swift String to Double


Code:
    override func viewDidLoad() {
        super.viewDidLoad()
        var s:NSString = "1234"
        var d = s.doubleValue
        println(d)
    }


參考資料:
http://stackoverflow.com/questions/24031621/swift-how-to-convert-string-to-double