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
+27.5k Golang : Decode/unmarshal unknown JSON data type with map[string]interface
+8.9k Golang : How to check if a string with spaces in between is numeric?
+8.2k Golang : Add text to image and get OpenCV's X, Y co-ordinates example
+7.2k Golang : Get YouTube playlist
+8.7k Golang : automatically figure out array length(size) with three dots
+40.7k Golang : How to check if a string contains another sub-string?
+17.3k Golang : Parse date string and convert to dd-mm-yyyy format
+16.1k Golang : Check if a string contains multiple sub-strings in []string?
+8.3k Python : Fix SyntaxError: Non-ASCII character in file, but no encoding declared
+18.8k Golang : Populate dropdown with html/template example
+20.9k Golang : Convert(cast) string to rune and back to string example
+10.3k Android Studio : Checkbox for user to select options example