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?
@\"10/04/2011\"
Objective-c:
NSString *day = [@"10/04/2011" componentsSeparatedByString:@"/"][0];
Swift:
var day: String = "10/04/2011".componentsSeparatedByString("/")[0]