I have a string like this: @"10/04/2011" and I want to save only the “10” in another string. How can I do that?
I have a string like this: @10/04/2011 and I want to save only the
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.
Update 7/3/2018:
Now that the question has acquired a Swift tag, I should add the Swift way of doing this. It’s pretty much as simple:
Although note that it gives you an array of
Substring. If you need to convert these back to ordinary strings, usemapor