包含字母的字符串 字母全部大写
-(NSString *)toUpper:(NSString *)str{
for (NSInteger i=0; i<str.length; i++) {
if ([str characterAtIndex:i]>='a'&[str characterAtIndex:i]<='z') {
//A 65 a 97
char temp=[str characterAtIndex:i]-32;
NSRange range=NSMakeRange(i, 1);
str=[str stringByReplacingCharactersInRange:range withString:[NSString stringWithFormat:@"%c",temp]];
}
}
return str;
}