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

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

good luck ISA 🙂