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
+14.6k Golang : How to shuffle elements in array or slice?
+6.1k Golang : Use NLP to get sentences for each paragraph example
+27.6k Golang : Convert CSV data to JSON format and save to file
+21.3k Golang : Sort and reverse sort a slice of strings
+26.7k Golang : Get executable name behind process ID example
+19.6k Golang : How to Set or Add Header http.ResponseWriter?
+12.3k Golang : Detect user location with HTML5 geo-location
+7.3k Nginx : How to block user agent ?
+18.1k Golang : Simple client server example
+15.2k Golang : How do I get the local IP (non-loopback) address ?
+8.1k Golang : Ways to recover memory during run time.
+10.4k Golang : How to profile or log time spend on execution?