According to Swift - Converting String to Int, there\'s a String method toInt().
String
toInt()
But, there\'s no toUInt() method. So, how to conv
toUInt()
Use Forced Unwrapping or Optional Binding to make sure the string can be converted to UInt. eg:
let string = "123" let number = UInt(string) //here number is of type *optional UInt* //Forced Unwrapping if number != nil { //converted to type UInt }