I have an NSRange and need to break a string into two substrings on either side of this NSRange. How do I get an integer value (like the index) out of an NSRange?
Share
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.
NSRangestruct consists of two integers – thelocationand thelength.It looks like
locationandlocation+lengthare the two expressions that you are looking for – the ranges for the left and right substring are as follows: