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
+4.2k List of Golang XML tutorials
+12.7k Golang : How to check for empty array string or string?
+8.1k Javascript : Read/parse JSON data from HTTP response
+49.2k Golang : Check if item is in slice/array
+13.4k Golang : Execute terminal command to remote machine example
+4.4k Javascript : Get operating system and browser information
+4.7k CloudFlare : Another way to get visitor's real IP address
+5.2k Golang : Get expvar(export variables) to work with multiplexer
+5.1k Golang : Pat multiplexer routing example
+22.6k Golang : Convert(cast) string to uint8 type and back to string
+38.3k Golang : Use wildcard patterns with filepath.Glob() example