replaced call to deprecated nsString API
git-svn-id: svn://10.0.0.236/trunk@41080 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e7466985c1
commit
b95059cd8b
@ -2855,7 +2855,7 @@ SI_FindValueInArgs(nsAutoString results, char* name) {
|
||||
return nsAutoString("").ToNewCString();
|
||||
}
|
||||
start += PL_strlen(name); /* get passed the |name| part */
|
||||
length = results.Find('|', start) - start;
|
||||
length = results.FindChar('|', PR_FALSE,start) - start;
|
||||
results.Mid(value, start, length);
|
||||
return value.ToNewCString();
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ peqWithParameter(nsIRDFResource *r1, nsIRDFResource *r2, PRBool *isParameter, co
|
||||
nsAllocator::Free(r1Str);
|
||||
|
||||
//Look to see if there are any parameters
|
||||
PRInt32 paramStart = r2nsStr.Find('?');
|
||||
PRInt32 paramStart = r2nsStr.FindChar('?');
|
||||
//If not, then just return whether or not the strings are equal.
|
||||
if(paramStart == -1)
|
||||
{
|
||||
|
||||
@ -33,7 +33,7 @@ nsresult GetMessageServiceProgIDForURI(const char *uri, nsString &progID)
|
||||
nsresult rv = NS_OK;
|
||||
//Find protocol
|
||||
nsString uriStr = uri;
|
||||
PRInt32 pos = uriStr.Find(':');
|
||||
PRInt32 pos = uriStr.FindChar(':');
|
||||
if(pos == -1)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsString protocol;
|
||||
|
||||
@ -1292,7 +1292,7 @@ nsMsgLocalMailFolder::CopyMessages(nsIMsgFolder* srcFolder, nsISupportsArray*
|
||||
rv = srcFolder->GetURI(&uri);
|
||||
nsString2 protocolType(uri, eOneByte);
|
||||
PR_FREEIF(uri);
|
||||
protocolType.SetLength(protocolType.Find(':'));
|
||||
protocolType.SetLength(protocolType.FindChar(':'));
|
||||
|
||||
if (!protocolType.EqualsIgnoreCase("mailbox"))
|
||||
{
|
||||
|
||||
@ -131,7 +131,7 @@ nsLocalMoveCopyMsgTxn::UndoImapDeleteFlag(nsIMsgFolder* folder,
|
||||
rv = folder->GetURI(&uri);
|
||||
nsString2 protocolType(uri, eOneByte);
|
||||
PR_FREEIF(uri);
|
||||
protocolType.SetLength(protocolType.Find(':'));
|
||||
protocolType.SetLength(protocolType.FindChar(':'));
|
||||
if (protocolType.EqualsIgnoreCase("imap"))
|
||||
{
|
||||
NS_WITH_SERVICE(nsIImapService, imapService, kCImapService, &rv);
|
||||
|
||||
@ -238,7 +238,7 @@ nsresult nsParseLocalMessageURI(const char* uri,
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsAutoString uriStr = uri;
|
||||
PRInt32 keySeparator = uriStr.Find('#');
|
||||
PRInt32 keySeparator = uriStr.FindChar('#');
|
||||
if(keySeparator != -1)
|
||||
{
|
||||
nsAutoString folderPath;
|
||||
|
||||
@ -2282,7 +2282,7 @@ PRInt32 nsNNTPProtocol::ReadArticle(nsIInputStream * inputStream, PRUint32 lengt
|
||||
void nsNNTPProtocol::ParseHeaderForCancel(char *buf)
|
||||
{
|
||||
nsString header(buf, eOneByte);
|
||||
PRInt32 colon = header.Find(':');
|
||||
PRInt32 colon = header.FindChar(':');
|
||||
if (!colon)
|
||||
return;
|
||||
|
||||
|
||||
@ -780,7 +780,7 @@ nsresult nsMsgNewsFolder::AbbreviatePrettyName(PRUnichar ** prettyName, PRInt32
|
||||
// get the total no. of words
|
||||
for (PRInt32 pos = 0;
|
||||
(pos++) != name.Length();
|
||||
pos = name.Find('.', pos))
|
||||
pos = name.FindChar('.', PR_FALSE,pos))
|
||||
totalwords ++;
|
||||
|
||||
// get the no. of words to abbreviate
|
||||
|
||||
@ -116,7 +116,7 @@ nsNewsURI2Path(const char* rootURI, const char* uriStr, nsFileSpec& pathResult)
|
||||
// the server name is the first component of the path, so extract it out
|
||||
PRInt32 hostStart = 0;
|
||||
|
||||
hostStart = uri.Find('/');
|
||||
hostStart = uri.FindChar('/');
|
||||
if (hostStart <= 0) return NS_ERROR_FAILURE;
|
||||
|
||||
// skip past all //
|
||||
@ -126,9 +126,9 @@ nsNewsURI2Path(const char* rootURI, const char* uriStr, nsFileSpec& pathResult)
|
||||
nsAutoString hostname (eOneByte);
|
||||
uri.Right(hostname, uri.Length() - hostStart);
|
||||
|
||||
PRInt32 hostEnd = hostname.Find('/');
|
||||
PRInt32 hostEnd = hostname.FindChar('/');
|
||||
|
||||
PRInt32 atPos = hostname.Find('@');
|
||||
PRInt32 atPos = hostname.FindChar('@');
|
||||
nsAutoString username(eOneByte);
|
||||
|
||||
username = "";
|
||||
@ -140,7 +140,7 @@ nsNewsURI2Path(const char* rootURI, const char* uriStr, nsFileSpec& pathResult)
|
||||
|
||||
username = "";
|
||||
|
||||
hostEnd = hostname.Find('/');
|
||||
hostEnd = hostname.FindChar('/');
|
||||
}
|
||||
|
||||
// newsgroup comes after the hostname, after the '/'
|
||||
@ -209,7 +209,7 @@ nsParseNewsMessageURI(const char* uri, nsString& messageUriWithoutKey, PRUint32
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsAutoString uriStr = uri;
|
||||
PRInt32 keySeparator = uriStr.Find('#');
|
||||
PRInt32 keySeparator = uriStr.FindChar('#');
|
||||
if(keySeparator != -1)
|
||||
{
|
||||
uriStr.Left(messageUriWithoutKey, keySeparator);
|
||||
|
||||
@ -187,7 +187,7 @@ nsresult nsNntpService::ConvertNewsMessageURI2NewsURI(const char *messageURI, ns
|
||||
// take news.mcom.com/mcom.linux (in hostname) and put
|
||||
// "mcom.linux" into newsgroupName and truncate to leave
|
||||
// "news.mcom.com" in hostname
|
||||
PRInt32 hostEnd = hostname.Find('/');
|
||||
PRInt32 hostEnd = hostname.FindChar('/');
|
||||
if (hostEnd > 0) {
|
||||
hostname.Right(newsgroupName, hostname.Length() - hostEnd - 1);
|
||||
hostname.Truncate(hostEnd);
|
||||
@ -379,7 +379,7 @@ nsresult nsNntpService::DetermineHostForPosting(nsString &host, const char *news
|
||||
#endif
|
||||
|
||||
// theRest is "group" or "host/group"
|
||||
PRInt32 slashpos = theRest.Find('/');
|
||||
PRInt32 slashpos = theRest.FindChar('/');
|
||||
if (slashpos > 0 ) {
|
||||
// theRest is "host/group"
|
||||
theRest.Left(currentHost, slashpos);
|
||||
@ -490,7 +490,7 @@ nsresult nsNntpService::ConvertNewsgroupsString(const char *newsgroupsNames, cha
|
||||
#endif
|
||||
|
||||
// theRest is "group" or "host/group"
|
||||
PRInt32 slashpos = theRest.Find('/');
|
||||
PRInt32 slashpos = theRest.FindChar('/');
|
||||
if (slashpos > 0 ) {
|
||||
nsString currentGroup("",eOneByte);
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ static PRBool CheckAndStrip(
|
||||
static PRInt16 CheckOrdinalAndStrip(nsString& ioString, PRInt16& outOrdinal)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
PRInt32 colonPos = ioString.Find(':');
|
||||
PRInt32 colonPos = ioString.FindChar(':');
|
||||
if (colonPos <= 0)
|
||||
return PR_FALSE;
|
||||
char* intString = ioString.ToNewCString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user