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
+23.3k Golang : Check if element exist in map
+32.4k Golang : Regular Expression for alphanumeric and underscore
+13.2k Golang : Read from buffered reader until specific number of bytes
+12.1k Golang : 2 dimensional array example
+9.1k Golang : How to get garbage collection data?
+9k Golang : does not implement flag.Value (missing Set method)
+17.3k Golang : [json: cannot unmarshal object into Go value of type]
+5.5k Golang : Struct field tags and what is their purpose?
+5.6k Golang : Markov chains to predict probability of next state example
+11.4k Golang : Simple file scaning and remove virus example
+15.7k Golang : Read large file with bufio.Scanner cause token too long error
+29.1k Golang : How to create new XML file ?