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
+5.7k Golang : Frobnicate or tweaking a string example
+14.4k Golang : Parsing or breaking down URL
+10.9k Golang : How to transmit update file to client by HTTP request example
+20.1k Golang : How to run your code only once with sync.Once object
+7.7k Golang : get the current working directory of a running program
+6.7k Golang : Derive cryptographic key from passwords with Argon2
+7.1k Golang : A simple forex opportunities scanner
+7.8k Golang : Reverse a string with unicode
+15.4k Golang : Find location by IP address and display with Google Map
+27.9k Golang : Decode/unmarshal unknown JSON data type with map[string]interface
+11.8k Golang : Verify Linux user password again before executing a program example
+8k Golang : What fmt.Println() can do and println() cannot do