Logo Search packages:      
Sourcecode: xulrunner version File versions

char * nsID::ToString (  )  const

nsID string encoder. Returns an allocated string in {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} format. Caller should free string. YOU SHOULD ONLY USE THIS IF YOU CANNOT USE ToProvidedString() BELOW.

Definition at line 129 of file nsID.cpp.

  char *res = (char*)PR_Malloc(NSID_LENGTH); // use PR_Malloc if this is to be freed with nsCRT::free

  if (res != NULL) {
    PR_snprintf(res, NSID_LENGTH, gIDFormat,
                m0, (PRUint32) m1, (PRUint32) m2,
                (PRUint32) m3[0], (PRUint32) m3[1], (PRUint32) m3[2],
                (PRUint32) m3[3], (PRUint32) m3[4], (PRUint32) m3[5],
                (PRUint32) m3[6], (PRUint32) m3[7]);
  return res;

Generated by  Doxygen 1.6.0   Back to index