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
+14k Golang : Parsing or breaking down URL
+5.1k Python : Delay with time.sleep() function example
+5.4k Golang : Find change in a combination of coins example
+12.8k Android Studio : Password input and reveal password example
+20k Golang : Pipe output from one os.Exec(shell command) to another command
+19.4k Golang : How to run your code only once with sync.Once object
+5.3k Fix fatal error: evacuation not done in time problem
+7.8k Golang : Emulate NumPy way of creating matrix example
+12.7k Golang : How to get a user home directory path?
+40.4k Golang : How to count duplicate items in slice/array?
+15.1k Golang : Get digits from integer before and after given position example
+8.1k Android Studio : Import third-party library or package into Gradle Scripts