View Full Version : Get Character code/Code point of input character
donaghy
Sep 15, 2009, 12:06 PM
Is there an existing function that will find the character code/code point of an input character? e.g. A = 65, a = 97, etc.
thanks.
rowsdower
Sep 15, 2009, 12:32 PM
I think you can just cast it to an int.
PhoneyDeveloper
Sep 15, 2009, 01:06 PM
I assume you mean from a textview or textfield.
You get the input values as an NSString using the text property of those classes. You can take apart the string using standard string methods. If you need to chop up a string best is to build substrings for a particular range of the string and use those strings for further uses.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.