I was wondering if anyone has the following php function equivalents in Objective-C for iPhone development:
- ord() # returns the ASCII value of the first character of a string.
- chr() # returns a character from the specified ASCII value.
Many thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how you can work with ASCII values and
NSString. Note that sinceNSStringis working with unichars, there could be unexpected results for a non ASCII string.