removed calls to deprecated nsString methods

This commit is contained in:
rickg%netscape.com 2000-03-12 11:06:57 +00:00
parent b8bc8e2084
commit 5dc7d01987
12 changed files with 23 additions and 23 deletions

View File

@ -3816,11 +3816,11 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode)
PRBool done = PR_FALSE; PRBool done = PR_FALSE;
while (!done && !token.IsEmpty()) { while (!done && !token.IsEmpty()) {
token.CompressWhitespace(); token.CompressWhitespace();
if (millis == -1 && nsString::IsDigit(token.First())) { if (millis == -1 && nsCRT::IsAsciiDigit(token.First())) {
PRInt32 i = 0; PRInt32 i = 0;
PRUnichar value = nsnull; PRUnichar value = nsnull;
while ((value = token[i++])) { while ((value = token[i++])) {
if (!nsString::IsDigit(value)) { if (!nsCRT::IsAsciiDigit(value)) {
i = -1; i = -1;
break; break;
} }

View File

@ -109,12 +109,12 @@ nsClassList::ParseClasses(nsClassList** aList, const nsString& aClassString)
PRUnichar* end = start; PRUnichar* end = start;
while (kNullCh != *start) { while (kNullCh != *start) {
while ((kNullCh != *start) && nsString::IsSpace(*start)) { // skip leading space while ((kNullCh != *start) && nsCRT::IsAsciiSpace(*start)) { // skip leading space
start++; start++;
} }
end = start; end = start;
while ((kNullCh != *end) && (PR_FALSE == nsString::IsSpace(*end))) { // look for space or end while ((kNullCh != *end) && (PR_FALSE == nsCRT::IsAsciiSpace(*end))) { // look for space or end
end++; end++;
} }
*end = kNullCh; // end string here *end = kNullCh; // end string here

View File

@ -479,13 +479,13 @@ nsXULCommandDispatcher::Matches(const nsString& aList, const nsString& aElement)
// found inside of 'blur'. // found inside of 'blur'.
if (indx > 0) { if (indx > 0) {
PRUnichar ch = aList[indx - 1]; PRUnichar ch = aList[indx - 1];
if (! nsString::IsSpace(ch) && ch != PRUnichar(',')) if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
return PR_FALSE; return PR_FALSE;
} }
if (indx + aElement.Length() < aList.Length()) { if (indx + aElement.Length() < aList.Length()) {
PRUnichar ch = aList[indx + aElement.Length()]; PRUnichar ch = aList[indx + aElement.Length()];
if (! nsString::IsSpace(ch) && ch != PRUnichar(',')) if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
return PR_FALSE; return PR_FALSE;
} }

View File

@ -5252,14 +5252,14 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement)
PRInt32 first = 0; PRInt32 first = 0;
while(1) { while(1) {
while (first < datasources.Length() && nsString::IsSpace(datasources.CharAt(first))) while (first < datasources.Length() && nsCRT::IsAsciiSpace(datasources.CharAt(first)))
++first; ++first;
if (first >= datasources.Length()) if (first >= datasources.Length())
break; break;
PRInt32 last = first; PRInt32 last = first;
while (last < datasources.Length() && !nsString::IsSpace(datasources.CharAt(last))) while (last < datasources.Length() && !nsCRT::IsAsciiSpace(datasources.CharAt(last)))
++last; ++last;
nsAutoString uriStr; nsAutoString uriStr;

View File

@ -3816,11 +3816,11 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode)
PRBool done = PR_FALSE; PRBool done = PR_FALSE;
while (!done && !token.IsEmpty()) { while (!done && !token.IsEmpty()) {
token.CompressWhitespace(); token.CompressWhitespace();
if (millis == -1 && nsString::IsDigit(token.First())) { if (millis == -1 && nsCRT::IsAsciiDigit(token.First())) {
PRInt32 i = 0; PRInt32 i = 0;
PRUnichar value = nsnull; PRUnichar value = nsnull;
while ((value = token[i++])) { while ((value = token[i++])) {
if (!nsString::IsDigit(value)) { if (!nsCRT::IsAsciiDigit(value)) {
i = -1; i = -1;
break; break;
} }

View File

@ -349,7 +349,7 @@ MimeExternalBody_parse_eof (MimeObject *obj, PRBool abort_p)
{ {
char *in, *out; char *in, *out;
for (in = url, out = url; *in; in++) for (in = url, out = url; *in; in++)
if (!nsString::IsSpace(*in)) if (!nsCRT::IsAsciiSpace(*in))
*out++ = *in; *out++ = *in;
*out = 0; *out = 0;
} }
@ -404,14 +404,14 @@ MimeExternalBody_parse_eof (MimeObject *obj, PRBool abort_p)
if (bod->body && all_headers_p) if (bod->body && all_headers_p)
{ {
char *s = bod->body; char *s = bod->body;
while (nsString::IsSpace(*s)) s++; while (nsCRT::IsAsciiSpace(*s)) s++;
if (*s) if (*s)
{ {
char *s2; char *s2;
const char *pre = "<P><PRE>"; const char *pre = "<P><PRE>";
const char *suf = "</PRE>"; const char *suf = "</PRE>";
PRInt32 i; PRInt32 i;
for(i = nsCRT::strlen(s)-1; i >= 0 && nsString::IsSpace(s[i]); i--) for(i = nsCRT::strlen(s)-1; i >= 0 && nsCRT::IsAsciiSpace(s[i]); i--)
s[i] = 0; s[i] = 0;
s2 = nsEscapeHTML(s); s2 = nsEscapeHTML(s);
if (!s2) goto FAIL; if (!s2) goto FAIL;

View File

@ -278,7 +278,7 @@ MimeMultipart_check_boundary(MimeObject *obj, const char *line, PRInt32 length)
term_p = PR_FALSE; term_p = PR_FALSE;
/* strip trailing whitespace (including the newline.) */ /* strip trailing whitespace (including the newline.) */
while(length > 2 && nsString::IsSpace(line[length-1])) while(length > 2 && nsCRT::IsAsciiSpace(line[length-1]))
length--; length--;
/* Could this be a terminating boundary? */ /* Could this be a terminating boundary? */

View File

@ -140,7 +140,7 @@ nsIOService::ExtractScheme(const char* inURI, PRUint32 *startPos, PRUint32 *endP
const char* uri = inURI; const char* uri = inURI;
// skip leading white space // skip leading white space
while (nsString::IsSpace(*uri)) while (nsCRT::IsAsciiSpace(*uri))
uri++; uri++;
PRUint32 start = uri - inURI; PRUint32 start = uri - inURI;
@ -166,7 +166,7 @@ nsIOService::ExtractScheme(const char* inURI, PRUint32 *startPos, PRUint32 *endP
} }
return NS_OK; return NS_OK;
} }
else if (nsString::IsAlpha(c)) { else if (nsCRT::IsAsciiAlpha(c)) {
length++; length++;
} }
else else

View File

@ -159,7 +159,7 @@ nsProtocolProxyService::CanUseProxy(nsIURI* aURI)
char* np= mFilters; char* np= mFilters;
while (*np) while (*np)
{ {
while (*np && (*np == ',' || nsString::IsSpace(*np))) while (*np && (*np == ',' || nsCRT::IsAsciiSpace(*np)))
np++; np++;
char* endproxy = np+1; char* endproxy = np+1;

View File

@ -109,12 +109,12 @@ nsClassList::ParseClasses(nsClassList** aList, const nsString& aClassString)
PRUnichar* end = start; PRUnichar* end = start;
while (kNullCh != *start) { while (kNullCh != *start) {
while ((kNullCh != *start) && nsString::IsSpace(*start)) { // skip leading space while ((kNullCh != *start) && nsCRT::IsAsciiSpace(*start)) { // skip leading space
start++; start++;
} }
end = start; end = start;
while ((kNullCh != *end) && (PR_FALSE == nsString::IsSpace(*end))) { // look for space or end while ((kNullCh != *end) && (PR_FALSE == nsCRT::IsAsciiSpace(*end))) { // look for space or end
end++; end++;
} }
*end = kNullCh; // end string here *end = kNullCh; // end string here

View File

@ -479,13 +479,13 @@ nsXULCommandDispatcher::Matches(const nsString& aList, const nsString& aElement)
// found inside of 'blur'. // found inside of 'blur'.
if (indx > 0) { if (indx > 0) {
PRUnichar ch = aList[indx - 1]; PRUnichar ch = aList[indx - 1];
if (! nsString::IsSpace(ch) && ch != PRUnichar(',')) if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
return PR_FALSE; return PR_FALSE;
} }
if (indx + aElement.Length() < aList.Length()) { if (indx + aElement.Length() < aList.Length()) {
PRUnichar ch = aList[indx + aElement.Length()]; PRUnichar ch = aList[indx + aElement.Length()];
if (! nsString::IsSpace(ch) && ch != PRUnichar(',')) if (! nsCRT::IsAsciiSpace(ch) && ch != PRUnichar(','))
return PR_FALSE; return PR_FALSE;
} }

View File

@ -5252,14 +5252,14 @@ nsXULDocument::CheckTemplateBuilder(nsIContent* aElement)
PRInt32 first = 0; PRInt32 first = 0;
while(1) { while(1) {
while (first < datasources.Length() && nsString::IsSpace(datasources.CharAt(first))) while (first < datasources.Length() && nsCRT::IsAsciiSpace(datasources.CharAt(first)))
++first; ++first;
if (first >= datasources.Length()) if (first >= datasources.Length())
break; break;
PRInt32 last = first; PRInt32 last = first;
while (last < datasources.Length() && !nsString::IsSpace(datasources.CharAt(last))) while (last < datasources.Length() && !nsCRT::IsAsciiSpace(datasources.CharAt(last)))
++last; ++last;
nsAutoString uriStr; nsAutoString uriStr;