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
+6.8k Golang : constant 20013 overflows byte error message
+20.8k Golang : For loop continue,break and range
+14k Golang : How to pass map to html template and access the map's elements
+25.4k Golang : How to write CSV data to file
+27k Golang : Convert CSV data to JSON format and save to file
+13.1k Android Studio : Password input and reveal password example
+21.4k Golang : Upload big file (larger than 100MB) to AWS S3 with multipart upload
+9.8k Golang : Read file and convert content to string
+6k Golang : Process non-XML/JSON formatted ASCII text file example
+25.5k Golang : missing Mercurial command
+6.1k Golang : Detect face in uploaded photo like GPlus
+25.1k Golang : Daemonizing a simple web server process example