*part = partSubStr.ToNewCString();
*part = ToNewCString(partSubStr);
nsresult nsParseImapMessageURI(const char* uri, nsCString& folderURI, PRUint32 *key, char **part){	if(!key)		return NS_ERROR_NULL_POINTER;	nsCAutoString uriStr(uri);	PRInt32 keySeparator = uriStr.RFindChar('#');	if(keySeparator != -1)	{    PRInt32 keyEndSeparator = uriStr.FindCharInSet("/?&",                                                    keySeparator); 		nsAutoString folderPath;		uriStr.Left(folderURI, keySeparator);		folderURI.Cut(4, 8);	// cut out the _message part of imap_message:		nsCAutoString keyStr;    if (keyEndSeparator != -1)        uriStr.Mid(keyStr, keySeparator+1,                    keyEndSeparator-(keySeparator+1));    else        uriStr.Right(keyStr, uriStr.Length() - (keySeparator + 1));		PRInt32 errorCode;		*key = keyStr.ToInteger(&errorCode);    if (part && keyEndSeparator != -1)    {      PRInt32 partPos = uriStr.Find("part=", PR_FALSE, keyEndSeparator);      if (partPos != -1)      {        nsCString partSubStr;        uriStr.Right(partSubStr, uriStr.Length() - keyEndSeparator);        *part = partSubStr.ToNewCString();      }    }	}	return NS_OK;}