title: Replacing escape characters with a space
body: <p>I have been asked to replace a escape characters in a string with a space.</p>
  
  <p>I have been trying like below</p>
  
  <pre><code>String replace(String data)
      {
          String strSpecial = "";
          strSpecial = " \f\n\r\t\'\"\\";     
  
          char charArray[] = strSpecial.toCharArray();
          String strOutData = data;
          for (int i =0;i&lt;charArray.length;i++)
          {  
                strOutData = strOutData.replace(charArray[i], ' ');
      }       
          return(strOutData);
  
      }
  </code></pre>
  
  <p>Im getting the error - "Unterminated String Constant"</p>
  
  <p>It is working when I use any character instead of a space to replace the escape character.</p>
  
  <p>Please suggest</p>
  
  <p>Thanks
  Sandeep</p>