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
+12.6k Golang : Fix image: unknown format error
+4.2k Python : Convert(cast) string to bytes example
+3.9k JQuery : Calling a function inside Jquery(document) block
+13.1k Golang : How to get URL port?
+12.6k Javascript : Prompt confirmation before exit
+16.2k Golang : Clone with pointer and modify value
+17.8k Golang : Fix cannot download, $GOPATH not set error
+14k Golang : Force download file example
+8.1k Golang : Create and shuffle deck of cards example
+4.4k Golang : Return multiple values from function
+25.8k Golang : Convert CSV data to JSON format and save to file