Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Swift - Converting String to Intによると、StringメソッドがありtoInt()ます。
String
toInt()
しかし、toUInt()方法はありません。Stringでは、 aを aに変換する方法はUint?
toUInt()
Uint
UIntのinitを使用するだけです:
let someString = "4" UInt(someString.toInt()!) // 4