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
+11.7k Use systeminfo to find out installed Windows Hotfix(s) or updates
+13.9k Golang : Image to ASCII art example
+20.4k Golang : Compare floating-point numbers
+9.3k Golang : Serving HTTP and Websocket from different ports in a program example
+19.6k Golang : How to Set or Add Header http.ResponseWriter?
+13.6k Golang : Increment string example
+12.2k Golang : Perform sanity checks on filename example
+7.1k Golang : Levenshtein distance example
+6.2k Golang : Debug with Godebug