Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsUnicodeToUCS2BE.cpp File Reference
#include "nsUnicodeToUCS2BE.h"
#include <string.h>

Go to the source code of this file.

Functions

static void SwapBytes (char *aDest, const PRUnichar *aSrc, PRInt32 aLen)

Function Documentation

void SwapBytes ( char *  aDest,
const PRUnichar aSrc,
PRInt32  aLen 
) [inline, static]

Definition at line 164 of file nsUnicodeToUCS2BE.cpp.

{
  PRUnichar *p = (PRUnichar*) aDest;
  // copy the data  by swaping 
  for(PRInt32 i = 0; i < aLen; i++)
  {
    PRUnichar aChar = *aSrc++;
    *p++ = (0x00FF & (aChar >> 8)) | (0xFF00 & (aChar << 8));
  }
}

Here is the caller graph for this function: