title: How to swap string in Objective c without any space?
body: <p>I have to swap an String a="abcd" to "cdab" 
  str="1234" to "3412".
  I am trying but it split each character</p>
  
  <pre><code>for (int i=2; i &lt; [hex length]; i++) {
      NSString *ichar  = [NSString stringWithFormat:@"%c", [hex characterAtIndex:i]];
      [characters addObject:ichar];
  }
  </code></pre>
  
  <p>Can anyone help me out?  How to split in two parts and then merge it?
  I am getting 4 character string from user so dont know what is coming but have to swap it.</p>