基本数据类型 转 字符串
let string = String(number);
let string = UIDevice.currentDevice().systemVersion;
_ = ( string as NSString ).doubleValue;
_ = ( string as NSString ).floatValue;
_ = ( string as NSString ).intValue;
_ = ( string as NSString ).integerValue;
_ = ( string as NSString ).boolValue;
//Int 64
_ = ( string as NSString ).longLongValue;
原文链接:https://www.f2er.com/swift/324099.html