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
+9.9k Golang : Wait and sync.WaitGroup example
+20.3k Golang : Convert PNG transparent background image to JPG or JPEG image
+11.2k Golang : Secure file deletion with wipe example
+6.2k Golang : Spell checking with ispell example
+13.4k Golang : unknown escape sequence error
+16k Golang : Generate QR codes for Google Authenticator App and fix "Cannot interpret QR code" error
+7.9k Golang : Number guessing game with user input verification example
+5.4k List of Golang XML tutorials
+4.9k Golang : Get FX sentiment from website example
+19.3k Golang : Set or Add HTTP Request Headers
+6.8k Ubuntu : connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream