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
+20.3k Golang : Read directory content with os.Open
+19.5k Golang : Append content to a file
+10.2k Golang : Allow Cross-Origin Resource Sharing request
+11.1k Android Studio : Create custom icons for your application example
+19.7k Golang : Reset or rewind io.Reader or io.Writer
+5.8k Javascript : Get operating system and browser information
+7k Golang : Calculate how many weeks left to go in a given year
+30.1k Get client IP Address in Go
+22k Golang : Read directory content with filepath.Walk()
+7.5k Golang : get the current working directory of a running program
+10.9k Golang : Intercept and process UNIX signals example
+5.8k Golang : Missing Subversion command