title: How to replace special characters in NSString with unknown index
body: <p>I am trying to replace some characters with unknown index like this(i need to replace this Ă,Ŏ,Ĭ,ă,ŏ,ĭ and my input nsstring can be anything):</p>
  
  <pre><code>(void)repairText:(NSString *)textToRepair{`
      NSString *pom = textToRepair;`
      int pomNum = [pom length];
  
      NSLog(@"Input nsstring: %@",pom);
  
      for (int a = 0; a&lt;pomNum; a++) {
          NSString *pomChar, *pomChar2;
  
          pomChar = [pom substringFromIndex:a];
          pomChar2 = [pomChar substringToIndex:(1)];
              NSLog(@"Char to repair: %@",pomChar2);
  
          if ([pomChar2 isEqual: @"Ă"] || [pomChar2 isEqual:@"Ŏ"] || [pomChar2 isEqual:@"Ĭ"] || [pomChar2 isEqual:@"ă"] || [pomChar2 isEqual:@"ŏ"] || [pomChar2 isEqual:@"ĭ"]) {
  
              if ([pomChar2 isEqual:@"Ă"]) {
                  NSLog(@"Wrong big a");
              }
              if ([pomChar2 isEqual:@"Ŏ"]) {
                  NSLog(@"Wrong big o");
              }
              if ([pomChar2 isEqual:@"Ĭ"]) {
                  NSLog(@"Wrong big i");
              }
              if ([pomChar2 isEqual:@"ă"]) {
                  NSLog(@"Wrong small a");
              }
              if ([pomChar2 isEqual:@"ŏ"]) {
                  NSLog(@"Wrong small o");
              }
              if ([pomChar2 isEqual:@"ĭ"]) {
                  NSLog(@"Wrong small i");
              }
          } else {
              NSLog(@"Good");
          }
      }
  
      pom = [textToRepair stringByReplacingOccurrencesOfString:@"•" withString:@" kulka "];
      pom = [textToRepair stringByReplacingOccurrencesOfString:@"¥" withString:@" jen "];
      pom = [textToRepair stringByReplacingOccurrencesOfString:@"£" withString:@" libra "];
      pom = [textToRepair stringByReplacingOccurrencesOfString:@"€" withString:@" euro "];
  
      [self synthesize:pom];
  }
  </code></pre>
  
  <p>But I am having trouble with 'if'. If anyone know about this, please help in this regard.</p>