Issue escaping single quote in iOS with stringByReplacingOccurrencesOfString:widthString
<pre><code> NSString *test =  @"d'escape";
 NSLog(@"%@", [test stringByReplacingOccurrencesOfString:@"'" withString:@"\'"]);
</code></pre>

<p>prints me this </p>

<pre><code>2010-10-25 15:10:54.833 MyApp[7136:207] d'escape
</code></pre>

<p>What am I doing wrong ? I want to get this :</p>

<pre><code>2010-10-25 15:10:54.833 MyApp[7136:207] d\'escape
</code></pre>
