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.3k Golang : Fix cannot download, $GOPATH not set error
+9k Generate Random number with math/rand in Go
+18k Golang : Reset or rewind io.Reader or io.Writer
+22.9k Golang : Convert long hexadecimal with strconv.ParseUint example
+4.1k Golang : Return multiple values from function
+5.4k Elasticsearch : Shutdown a local node
+1.6k Golang : Fix go-cron set time not working issue
+10.1k Golang : Convert decimal number(integer) to IPv4 address
+3.9k Golang : Qt update UI elements with core.QCoreApplication_ProcessEvents
+16.9k Golang : How to get own program name during runtime ?
+5.5k Golang : Output or print out JSON stream/encoded data
+29.4k Golang : Smarter Error Handling with strings.Contains()