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
+4.8k Golang : Check if a word is countable or not
+9.4k Golang : Detect number of active displays and the display's resolution
+13k Golang : Date and Time formatting
+7.4k Golang : Error reading timestamp with GORM or SQL driver
+19.2k Golang : How to Set or Add Header http.ResponseWriter?
+9.8k Golang : Identifying Golang HTTP client request
+17.7k Golang : How to log each HTTP request to your web server?
+6.9k Golang : Get Alexa ranking data example
+6.7k Golang : How to call function inside template with template.FuncMap
+5.1k Golang : Reclaim memory occupied by make() example
+11.3k Golang : Change date format to yyyy-mm-dd
+5.3k Clean up Visual Studio For Mac installation failed disk full problem