I want to scan this line
"hello I am emp 1313 object of string class 123"
therefore, in this I want to know if there is any integer value, and if it is present, I want to display them for this. I use the NSScanner class and see the look of my code
NSString *str = @" hello I am emp 1313 object of string class 123"; NSString *limit = @" object"; NSScanner *scanner = [NSScanner scannerWithString:str]; int i; [scanner scanInt:&i]; NSString *output; [scanner scanUpToString:limit intoString:&output]; NSLog(@"%d",i);
but the problem is that I cannot do this, and I want to use the NSScanner class, so that you can give me some tips regarding this .....
Radix source share