I have a string with random numbers,
like “12345678912234”
I want to split it into 4 parts, like,
string1 = 123
string2 = 456
string3 = 7891
string4 = 2234
anybody has any idea??
I’ve tried using NSRange but I cannot get it. May be I’m using it wrong.
I also tried using substringToIndex but it failed too.
Just tested it 🙂 Works fine. (Just to clarify: I have named the function incorrectly as it is not toY but how many characters you want to take in from X).