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
+5k Golang : How to delete element(data) from map ?
+2.5k PHP : Convert CSV to JSON with YQL example
+3.2k Golang : Generate Datamatrix barcode
+22.8k Golang : Disable security check for HTTPS(SSL) with bad or expired certificate
+10.5k Golang : Simple client server example
+2.5k Linux/Unix : Commands that you need to be careful about
+6.1k Golang : How to parse plain email text and process email header?
+18.2k Golang : Gorilla mux routing example
+2.7k Golang : Getting Echo framework StartAutoTLS to work
+6.3k Golang : unknown escape sequence error
+8.5k Golang : Get number of CPU cores
+3.7k Golang : Load DSA public key from file example