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
+8k Golang : Play .WAV file from command line
+8.9k Golang : Edge detection with Sobel method
+6.6k Golang : Test if an input is an Armstrong number example
+10k Golang : How to use if, eq and print properly in html template
+10.9k Golang : Add ASCII art to command line application launching process
+11.3k Elastic Search : Return all records (higher than default 10)
+12.9k Golang : Convert IP version 6 address to integer or decimal number
+6.7k Golang : Error reading timestamp with GORM or SQL driver
+8.6k Golang : List available AWS regions
+12k Golang : Image to ASCII art example
+9.5k Golang : Get currencies exchange rates example