title: NSString contents get truncated because of the null character in the middle of the string
body: <p>I am getting null character in the middle of the string obtained as a part of response to HTTP Post. As a result the content gets printed only upto the null character even though the string has more data in it. Below is the sample code that illustrates the problem</p>
  
  <pre><code> NSString *testString= @"v1db1���������¿¿sssss"; -&gt;this line shows the null character warning
   NSInteger stringlength = [testString length];
   NSLog(@"String Length:%ld",stringlength);
   NSLog(@"String Value:%@",testString);
  </code></pre>
  
  <p>Note: the test string contains a null character with the question mark. For some reason I am not able to save the post if I copy the exact string.</p>
  
  <p>The first line shows a warning  "Null character(s) preserved in string literal" in Xcode.</p>
  
  <p>The output of this program is </p>
  
  <pre><code> String Length:21
   String Value:v1db1
  </code></pre>
  
  <p>What is the correct approach to solve this problem?. I am thinking of scanning the NSString for any null character and removing the same. What could be the reason I am getting null character ?.   </p>