Swift : Convert (cast) Int to int32 or Uint32
Problem :
How to convert (cast) Int to Int32 in Swift programming language ?
Solution :
Use the Int32() function to convert or cast the Int variable. For example :
let x : Int = 100
var x32 = Int32(x)
and
var xu32 = UInt32(x)
See also : Swift : Convert (cast) Int to String ?
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
+8.8k Golang : Detect number of faces or vehicles in a photo
+29.5k Golang : bufio.NewReader.ReadLine to read file line by line
+5.8k Fix sudo yum hang problem with no output or error messages
+11.6k Golang : Drop cookie to visitor's browser and http.SetCookie() example
+12.8k Golang : Chunk split or divide a string into smaller chunk example
+8.9k Golang : Find and replace data in all files recursively
+11.7k Python : Convert IPv6 address to decimal and back to IPv6
+6.8k Swift : Convert (cast) String to Double
+11.1k Golang : Add ASCII art to command line application launching process
+21.1k Golang : How to read JPG(JPEG), GIF and PNG files ?
+7.7k Golang : Accept any number of function arguments with three dots(...)