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.1k Golang : Get password from console input without echo or masked
+5.3k Javascript : How to check a browser's Do Not Track status?
+26.9k Golang : Validate IP address
+5k Golang : How to get username from email address
+9.8k Golang : Get uploaded file name or access uploaded files
+3.3k Unix/Linux/MacOSx : How to remove an environment variable ?
+8.6k Golang : Clean formatting/indenting or pretty print JSON result
+25.9k Golang : Example for ECDSA(Elliptic Curve Digital Signature Algorithm) package functions
+26.1k Golang : Math pow(the power of x^y) example
+16.9k Golang : How to print rune, unicode, utf-8 and non-ASCII CJK(Chinese/Japanese/Korean) characters?
+8.4k Golang : Verify Linux user password again before executing a program example
+8.8k Google Maps URL parameters configuration