I'm trying to loop through a NSString, character by character, but I'm getting a EXC_BAD_ACCESS error. Do you have an idea how to do this right? I've been googling for hours now but can't figure it out.

Here is my code (.m):

self.textLength = [self.text length];

for (int position=0; position < self.textLength; position++) {

    NSLog(@"%@", [self.text characterAtIndex:position]);

    if ([[self.text characterAtIndex:position] isEqualToString:@"."]){
        NSLog(@"it's a .");
    }
}

Thanks a lot!

Edit
Report