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
+13.2k Golang : On enumeration
+6.9k Golang : Get all countries phone codes
+18.3k Golang : Check if os.Stdin input data is piped or from terminal
+17.7k Golang : Calculate entire request body length during run time
+24.5k Golang : How to write CSV data to file
+21.6k Golang : Strings to lowercase and uppercase example
+18.3k Golang : Count JSON objects and convert to slice/array
+11.1k Golang : convert(cast) string to integer value
+7k Golang : Add build version and other information in executables
+12.6k Golang : Fix image: unknown format error
+9.1k Golang : Wait and sync.WaitGroup example