ios - In objective-c how to get characters after n-th? -
i have number represented string. longer 4 chars. need create new string 5th till end number.
for illustration if have 56789623, need have 9623 result (5678 | 9623).
how that?
p.s. suppose simple question, don't know how inquire google that.
nsstring *str = @"56789623"; nsstring *first, *second; if ([str length] > 4) { first = [str substringwithrange:nsmakerange(0, 4)]; sec = [str substringwithrange:nsmakerange(4, [str length] - 4)]; } else { first = str; sec = nil; }
ios objective-c
No comments:
Post a Comment