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
+13.1k Golang : Skip blank/empty lines in CSV file and trim whitespaces example
+14.1k Golang : Check if a file exist or not
+9k Golang : Handle sub domain with Gin
+17.9k Golang : Get all upper case or lower case characters from string example
+13.5k Golang : Qt progress dialog example
+8.6k Golang : Combine slices but preserve order example
+11.5k Golang : Display a text file line by line with line number example
+11.5k Android Studio : Create custom icons for your application example
+5.2k Responsive Google Adsense
+6k Golang : Missing Subversion command
+18k Golang : Check if a directory exist or not