Swift : Convert (cast) Character to Integer?
Problem :
How to convert (cast) character to integer in Swift programming language ?
Solution :
Simple. Just cast the character variable with Int() function. For example :
let intchar = Int(character)
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
+10.8k Golang : Underscore string example
+9.2k Golang : Handle sub domain with Gin
+22.3k Golang : Print leading(padding) zero or spaces in fmt.Printf?
+8.4k Useful methods to access blocked websites
+14.6k Golang : How to check if your program is running in a terminal
+13.7k Golang : reCAPTCHA example
+7k Golang : How to solve "too many .rsrc sections" error?
+12.2k Golang : convert(cast) string to integer value
+9.1k Golang : Capture text return from exec function example
+21.2k Golang : For loop continue,break and range
+22.5k Golang : Convert Unix timestamp to UTC timestamp
+12.1k Golang : Clean formatting/indenting or pretty print JSON result