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
+17.5k Golang : Login and logout a user after password verification and redirect example
+10.4k Golang : How to delete element(data) from map ?
+11.8k Golang : Get remaining text such as id or filename after last segment in URL path
+8.8k Golang : Simple histogram example
+7.1k Golang : Process json data with Jason package
+16.7k Golang : Get number of CPU cores
+17.3k Golang : Parse date string and convert to dd-mm-yyyy format
+6.6k Mac/Linux/Windows : Get CPU information from command line
+7.3k SSL : How to check if current certificate is sha1 or sha2 from command line
+20.1k Android Studio : AlertDialog and EditText to get user string input example