Trim String NewLines and Breaks CarriageReturn and LineFeed Function new

i wrote this function early on the 2005, flash mx i guess, this function remove double Cr And Lf on strings and return a clean
 text

function trimCrLfs(xString){
//Trim double Crr/lnFeeds -18-1-2005 (C) mShehata xStr=new String(xString);
xBuffer = new String();
for(i=0;i<=xStr.length;i++)
   if (!(xStr.charCodeAt(i)==13))xBuffer=xBuffer+xStr.charAt(i); return(xBuffer); }

good luck ISA 🙂