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
+13k Golang : Convert(cast) int to int64
+19.1k Golang : Check if directory exist and create if does not exist
+13.6k Golang : Image to ASCII art example
+11.8k Golang : How to parse plain email text and process email header?
+11k Golang : How to determine a prime number?
+15k Golang : How do I get the local IP (non-loopback) address ?
+15.5k Golang : How to convert(cast) IP address to string?
+6.9k Golang : Levenshtein distance example
+12.6k Golang : Add ASCII art to command line application launching process
+10.6k Golang : Get currencies exchange rates example
+6k Golang : How to verify input is rune?
+12k Golang : convert(cast) string to integer value