First part of fix for bug 107575 - remove nsString::FindChar because there is already an nsAString::FindChar, and remove the "ignore case" option in RFindChar

r=dougt, sr=jag


git-svn-id: svn://10.0.0.236/trunk@113200 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
2002-01-30 06:04:29 +00:00
parent 1d98bc69e0
commit 4331ed65d3
42 changed files with 153 additions and 296 deletions

View File

@@ -971,7 +971,7 @@ nsHTMLContentSerializer::HasLongLines(const nsString& text, PRInt32& aLastNewlin
aLastNewlineOffset = kNotFound;
for (start = 0; start < theLen; )
{
PRInt32 eol = text.FindChar('\n', PR_FALSE, start);
PRInt32 eol = text.FindChar('\n', start);
if (eol < 0) {
eol = text.Length();
}

View File

@@ -93,7 +93,7 @@ nsParserUtils::GetQuotedAttributeValue(nsString& aSource,
if (posnOfValueDelimiter != -1) {
startOfValue = posnOfValueDelimiter + 1;
// Find the ending quote or apostrophe
posnOfValueDelimiter = aSource.FindChar(delimiter, PR_FALSE, startOfValue);
posnOfValueDelimiter = aSource.FindChar(delimiter, startOfValue);
// If found
if (posnOfValueDelimiter != -1) {
// Set the value of the attibute and exit the loop

View File

@@ -351,7 +351,7 @@ nsFormSubmitter::OnSubmit(nsIForm* form,
if (!theScheme.EqualsIgnoreCase("javascript")) {
// Bug 42616: Trim off named anchor and save it to add later
PRInt32 namedAnchorPos = href.FindChar('#', PR_FALSE, 0);
PRInt32 namedAnchorPos = href.FindChar('#');
nsAutoString namedAnchor;
if (kNotFound != namedAnchorPos) {
href.Right(namedAnchor, (href.Length() - namedAnchorPos));
@@ -1162,7 +1162,7 @@ nsFormSubmitter::GetSubmitCharset(nsIForm* form,
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID, &rv));
if (NS_SUCCEEDED(rv) && calias) {
do {
spPos = acceptCharsetValue.FindChar(PRUnichar(' '),PR_TRUE, offset);
spPos = acceptCharsetValue.FindChar(PRUnichar(' '), offset);
PRInt32 cnt = ((-1==spPos)?(l-offset):(spPos-offset));
if (cnt > 0) {
nsAutoString charset;

View File

@@ -277,7 +277,7 @@ GetDocTypeToken(nsString& aStr,
// before Cut() and adjust the cut amount.
if (aQuotedString) {
PRInt32 endQuote = aStr.FindChar(aStr[0],PR_FALSE,1);
PRInt32 endQuote = aStr.FindChar(aStr[0],1);
aStr.Mid(aToken,1,endQuote-1);
aStr.Cut(0,endQuote+1);
} else {
@@ -680,7 +680,7 @@ nsXMLContentSink::LoadXSLStyleSheet(nsIURI* aUrl)
// Hook up the content sink to the parser's output and ask the parser
// to start parsing the URL specified by aURL.
parser->SetContentSink(sink);
nsAutoString utf8(NS_LITERAL_STRING("UTF-8"));
NS_NAMED_LITERAL_STRING(utf8, "UTF-8");
styleDoc->SetDocumentCharacterSet(utf8);
parser->SetDocumentCharset(utf8, kCharsetFromDocTypeDefault);
parser->Parse(aUrl);