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.9k Yum Error: no such table: packages
+36.5k Golang : Smarter Error Handling with strings.Contains()
+17.6k Golang : Linked list example
+26.2k Golang : How to read integer value from standard input ?
+10.5k Golang : Generate random integer or float number
+14.6k Golang : Find network of an IP address
+5.1k Nginx and PageSpeed build from source CentOS example
+7.7k Golang : Dealing with struct's private part
+14.7k Golang : How to determine if user agent is a mobile device example
+7.5k Golang : How to fix html/template : "somefile" is undefined error?
+7.6k Golang : Gorrila set route name and get the current route name