By the way I have this declared in my .h file.
Even if there is a string method for this I would like to know how I could do this.
Here is my code.
-(NSInteger) RetrieveAscCode:(NSString*) inchr{
NSString *chtable =@"0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
NSInteger scan;
NSString *trim;
trim = [inchr substringToIndex:1];
for(scan=0;scan<255;scan++){
if (trim ==[chtable substringWithRange: NSMakeRange (scan, 1) ]) {
break;
}
}
return scan;
}`