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
+8.4k Facebook : Getting the friends list with PHP return JSON format
+11.7k Golang : http.Get example
+7.8k Golang : Find duplicate files with filepath.Walk
+8.7k Golang : Load ASN1 encoded DSA public key PEM file example
+15.3k Golang : Get the IPv4 and IPv6 addresses for a specific network interface
+5.3k Golang : Handling image beyond OpenCV video capture boundary
+18.2k Golang : Measure http.Get() execution time
+12k Golang : Calculate elapsed years or months since a date
+14.2k Golang : How to add color to string?
+17.6k Golang : Get host name or domain name from IP address
+14k Golang : rune literal not terminated error
+18.3k Golang : Archive directory with tar and gzip