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
+6.2k Golang : Use modern ciphers only in secure connection
+13k Golang : Send email with attachment(RFC2822) using Gmail API example
+8.4k Golang : Launch Mac OS X Preview (or other OS) application from your program example
+8.6k Javascript : Read/parse JSON data from HTTP response
+4.3k JavaScript/JQuery : Redirect page examples
+5k Golang : How to write backslash in string?
+8k Golang : Generate random Chinese, Japanese, Korean and other runes
+8.1k Golang : Create and shuffle deck of cards example
+5k Fix ERROR 2003 (HY000): Can't connect to MySQL server on 'IP address' (111)
+18.2k Golang : Delete item from slice based on index/key position
+10.5k Golang : Change date format to yyyy-mm-dd
+16.2k Golang : How to remove certain lines from a file