rPtr = wPtr = sPtr = NS_CONST_CAST(PRUnichar*, data.get());
rPtr = wPtr = sPtr = data.BeginWriting();
static void TranslateLineEnding(nsString& data){  PRUnichar* rPtr;   //Read pointer  PRUnichar* wPtr;   //Write pointer  PRUnichar* sPtr;   //Start data pointer  PRUnichar* ePtr;   //End data pointer  rPtr = wPtr = sPtr = NS_CONST_CAST(PRUnichar*, data.get());  ePtr = rPtr + data.Length();  while (rPtr < ePtr)  {    if (*rPtr == 0x0D)      if (rPtr + 1 < ePtr && *(rPtr + 1) == 0x0A)      {        *wPtr = 0x0A;        rPtr ++;      }      else        *wPtr = 0x0A;    else      *wPtr = *rPtr;    rPtr ++;    wPtr ++;  }  data.SetLength(wPtr - sPtr);}