How can i extract the portion of a string giving the beginning and the end position?
I know there is a method called substr() but is not what im looking for (the third parameter is lenght of the portion..)
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.
If you have the start and end positions, the length is just end – start:
See this in action at http://www.ideone.com/LRfYT.