I want to use characterAtIndex:(NSUInteger)index method of NSString class
I want to compare the value returned by characterAtIndex:(NSUInteger)index of NSString class wit开发者_JAVA技巧h a another NSString having one character stored in it any suggestion
On the top of my head, you can compare them directly using characterAtIndex on the other NSString as well.
if([string characterAtIndex:index] == [stringWithOneChar characterAtIndex:0]){
// Do something here...
}
NSString *temp = @"Hello";
NSString *temp2 = @"H";
if([temp characterAtIndex:0] == [temp2 characterAtIndex:0] )
精彩评论