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.2k Javascript : Prompt confirmation before exit
+5.3k PHP : Hide PHP version information from curl
+8.7k Golang : Progress bar with ∎ character
+7.5k Golang : Hue, Saturation and Value(HSV) with OpenCV example
+17.4k Golang : Check if IP address is version 4 or 6
+16.4k Golang :Trim white spaces from a string
+23k Golang : Test file read write permission example
+9.4k Golang : Terminate-stay-resident or daemonize your program?
+8.3k Golang : Check if integer is power of four example
+9.6k Golang : Validate IPv6 example
+25.3k Golang : Convert uint value to string type
+11k Golang : Create Temporary File