#import<Foundation/Foundation.h>
@interface
+ (int)numberCountOfString:(NSString *)number;
@end
@implementation
+ (int)numberCountOfString:(NSString *)number
{
Int count+;
For(int i=0;i<number.length;i++)
{
Unichar c = [number charaterAtIndex:i];
If(c>=’0’&&C<=’9’)
{
Count++;
}
}
Return 0;
}
@end
Int main()
{
Int s = [NSString number numberCountOfString:@”416543asdfas1313”];
Return 0;
}