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
+4.1k JQuery : Calling a function inside Jquery(document) block
+13.6k Golang : How to filter a map's elements for faster lookup
+22.7k Golang : Check if element exist in map
+20.4k Golang : GORM create record or insert new record into database example
+13.8k Golang : package is not in GOROOT during compilation
+35.4k Golang : Convert date or time stamp from string to time.Time type
+29k Golang : How to verify uploaded file is image or allowed file types
+8.2k Golang : How to use Gorilla webtoolkit context package properly
+9.9k Golang : How to transmit update file to client by HTTP request example
+5k Golang : Find change in a combination of coins example