Swift 3 conversion from Int to String
string, swift3
Solution
It's calling `init(_:)` (or `init(_:)` for `UnsignedInteger`) arguments of the `String` class.
Rather than defining separate initializers for `Int`, `Int64`, `Int32`, `Int16`, `Int8`, `UInt`, `UInt64`, `UInt32`, `UInt16`, and `UInt8`, Apple made two generic initializers: one for `SignedInteger` types, and one for `UnsignedInteger` types.
Problem
In Swift 3, the `String` structure does not seem to have an initializer `init(_: Int)` that will allow the conversion from an `Int` to a `String`. My question is why does `let i = String(3)` work? What `String` method or initializer is it calling? Thanks.