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
+17.8k Golang : Fix cannot download, $GOPATH not set error
+28.9k Golang : Calculate percentage change of two values
+7.9k Golang : How to get username from email address
+4.5k Golang : Shortening import identifier
+21.4k Golang : simulate tail -f or read last line from log file example
+13.2k Golang : GUI with Qt and OpenCV to capture image from camera
+5.9k Golang : How to call function inside template with template.FuncMap
+30.1k Golang : Math pow(the power of x^y) example
+11.8k Golang : Convert IPv4 address to packed 32-bit binary format
+46.2k Golang : How to convert JSON string to map and slice
+27.8k Golang : Get first few and last few characters from string
+11.5k Golang : Get terminal width and height example