title: How do I detect and remove "\n" from given string in action script?
body: <p>I have the following code,</p>
  
  <pre><code>public static function clearDelimeters(formattedString:String):String
  {
      return formattedString.split("\n").join("").split("\t").join("");
  }
  </code></pre>
  
  <p>The spaces i.e. "\t" are removed but the newline "\n" are not removed from the formattedString.</p>
  
  <p>I even tried</p>
  
  <pre><code>public static function clearDelimeters(formattedString:String):String
  {
      var formattedStringChar:String = "";
      var originalString:String = "";
      var j:int = 0;
      while((formattedStringChar = formattedString.charAt(j)) != "")
      {
          if(formattedStringChar == "\t" || formattedStringChar == "\n")
          {
              j++;
          }
          else
          {
              originalString = originalString + formattedString;
          }
          j++;
      }
      return originalString;
  }
  </code></pre>
  
  <p>This also didn't work.<br>
  Expected help is the reason why newline delimeters are not removed and some way to remove the newline.<br>
  Thank you in anticipation</p>