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
+21.1k Golang : Clean up null characters from input data
+22.1k Golang : Repeat a character by multiple of x factor
+16.9k Golang : Capture stdout of a child process and act according to the result
+9.1k Golang : does not implement flag.Value (missing Set method)
+8.5k Golang : Convert(cast) []byte to io.Reader type
+21.7k Golang : Upload big file (larger than 100MB) to AWS S3 with multipart upload
+6k Golang : Grab news article text and use NLP to get each paragraph's sentences
+4.7k Unix/Linux : How to pipe/save output of a command to file?
+36.4k Golang : Validate IP address
+13.8k Golang : unknown escape sequence error
+18.5k Golang : Generate thumbnails from images