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
+9.3k Golang : Find the length of big.Int variable example
+18.6k Golang : convert int to string
+6k PHP : How to check if an array is empty ?
+9.8k Golang : Turn string or text file into slice example
+6k Golang : Measure execution time for a function
+12k Golang : convert(cast) string to integer value
+9.3k Golang : How to protect your source code from client, hosting company or hacker?
+4.8k HTTP common errors and their meaning explained
+12.3k Golang : 2 dimensional array example
+10.5k Golang : Bubble sort example
+12.9k Swift : Convert (cast) Int to String ?