nsCRT::memcpy(resultString, inSrc, sizeof(T) * ioLen);
memcpy(resultString, inSrc, sizeof(T) * ioLen);
static T* ConvertBreaks(const T* inSrc, PRInt32& ioLen, const char* srcBreak, const char* destBreak){  NS_ASSERTION(inSrc && srcBreak && destBreak, "Got a null string");    T* resultString = nsnull;     // handle the no conversion case  if (nsCRT::strcmp(srcBreak, destBreak) == 0)  {    resultString = (T *)nsMemory::Alloc(sizeof(T) * ioLen);    if (!resultString) return nsnull;    nsCRT::memcpy(resultString, inSrc, sizeof(T) * ioLen); // includes the null, if any    return resultString;  }      PRInt32 srcBreakLen = nsCRT::strlen(srcBreak);  PRInt32 destBreakLen = nsCRT::strlen(destBreak);  // handle the easy case, where the string length does not change, and the  // breaks are only 1 char long, i.e. CR <-> LF  if (srcBreakLen == destBreakLen && srcBreakLen == 1)  {    resultString = (T *)nsMemory::Alloc(sizeof(T) * ioLen);    if (!resultString) return nsnull;        const T* src = inSrc;    const T* srcEnd = inSrc + ioLen;		// includes null, if any    T*       dst = resultString;        char srcBreakChar = *srcBreak;        // we know it's one char long already    char dstBreakChar = *destBreak;        while (src < srcEnd)    {      if (*src == srcBreakChar)      {        *dst++ = dstBreakChar;        src++;      }      else      {        *dst++ = *src++;      }    }    // ioLen does not change  }  else  {    // src and dest termination is different length. Do it a slower way.        // count linebreaks in src. Assumes that chars in 2-char linebreaks are unique.    PRInt32 numLinebreaks = CountLinebreaks(inSrc, ioLen, srcBreak);        PRInt32 newBufLen = ioLen - (numLinebreaks * srcBreakLen) + (numLinebreaks * destBreakLen);    resultString = (T *)nsMemory::Alloc(sizeof(T) * newBufLen);    if (!resultString) return nsnull;        const T* src = inSrc;    const T* srcEnd = inSrc + ioLen;		// includes null, if any    T*       dst = resultString;        while (src < srcEnd)    {      if (*src == *srcBreak)      {        *dst++ = *destBreak;        if (destBreak[1])          *dst++ = destBreak[1];              src ++;        if (src < srcEnd && srcBreak[1] && *src == srcBreak[1])          src ++;      }      else      {        *dst++ = *src++;      }    }        ioLen = newBufLen;  }    return resultString;}