Replace all occurances of certain characters in given buffer with a new character
int memory_replace( LPSTR lpBuff, int nSize, LPSTR chOldList, int nOldListSize, char chNew )
number of characters replaced, or -1 if error happened
EX1
void memory_replace_ex1() { char szTemp[10] = "A\tB\r\nC"; char szNonePrintable[] = "\t\r\n"; int nRet = memory_replace(szTemp, lstrlen(szTemp), szNonePrintable, lstrlen(szNonePrintable), '.'); if(nRet) out_str(szTemp); else out_str("repalce failed\n"); }
origin.h