SELECT REPLACE(REPLACE(MonChampAvecCRLF, CHAR(13), ' '), CHAR(10), ' ') AS MonChampSansCRLF, FROM MaTable;
/* Pour informations: CR : Carriage Return ( 0x0D ) LF : Line Feed ( 0x0A ) */ $myVarsWithoutCRLF = str_replace(array("\n","\r")," ",$myVars);
string myVarsWithoutCRLF = myVar.Replace("\n", " ").Replace("\r"," ");
select replace(replace(myField,"\n"," "),"\r"," ") from myTable
public static String enleveRC(String texte){ return texte.replaceAll("[\n\r]+"," "); }
Function ReplaceCRLF(sStr As String, Optional sSepar As String = " ") As String ReplaceCRLF = Replace(sStr, vbCrLf, sSepar) End Function
Pendant qu'on y sera, on retourne le pointeur sur fin de chaine nettoyée pour éviter tout strcat et donc chainer directement si besoin. char* strRemoveCRLF(char *psz) { char *d = psz; // POINTEUR D'ECRITURE while(*psz) { if((*psz != '\r') && (*psz != '\n')) *d++ = *psz; psz++; } *d = 0; return d; }
function line(variable){variable=variable.split("\n").join();}