Swift : Convert (cast) Int to String ?
Problem :
How to convert (cast) Int to String in Swift programming language ?
Solution :
Just cast the Int variable with String() functon. For example :
let x : Int = 100
var str = String(x)
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+7.1k Golang : Variadic function arguments sanity check example
+18.7k Golang : Accept input from user with fmt.Scanf skipped white spaces and how to fix it
+26k Golang : Convert integer to binary, octal, hexadecimal and back to integer
+6.1k Nginx : How to block user agent ?
+23.9k Golang : Convert IP address string to long ( unsigned 32-bit integer )
+6.3k Golang : Process json data with Jason package
+19.1k Golang : How to force compile or remove object files first before rebuild?
+8.7k Golang : List available AWS regions
+5.4k Golang : Break string into a slice of characters example
+7.4k Golang : Implementing class(object-oriented programming style)
+11.6k Golang : Convert int(year) to time.Time type
+7.4k Golang : Count leading or ending zeros(any item of interest) example