iphone - Get one by one character (value) from NSString -
i have nsstring in store value 2534568
i want first number 2 , 5 ,
then 3 , on.....
thanks advance
since no correct answer has been provided far, must answer if didn't otherwise. don't want misleaded:
nsuinteger len = string.length; unichar buf[len]; [string getcharacters:buf range:nsmakerange(0, len)];
here, buf
contain characters can iterate through. alternatively, can use charateratindex:
method too, although i'm not sure that's not slower plain array indexing. (thus should benchmarked if it's bottleneck, don't perform premature optimization, though.)
Comments
Post a Comment