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
+11.9k Golang : List objects in AWS S3 bucket
+3.7k MariaDB/MySQL : How to get version information
+16.4k How to enable MariaDB/MySQL logs ?
+30.9k Golang : Convert []string to []byte examples
+22.1k Golang : minus time with Time.Add() or Time.AddDate() functions to calculate past date
+9.9k Golang : Delay or limit HTTP requests example
+12.8k Golang: Pad right or print ending(suffix) zero or spaces in fmt.Printf example
+4.6k PHP : Convert CSV to JSON with YQL example
+18k Golang : How to run your code only once with sync.Once object
+7.4k Golang : On lambda, anonymous, inline functions and function literals
+15.4k Golang : Set up source IP address before making HTTP request
+6k Golang : Transform lisp or spinal case to Pascal case example