replaced call to deprecated string API

git-svn-id: svn://10.0.0.236/trunk@41076 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-07-26 00:40:34 +00:00
parent ba693215ad
commit abb5292365
2 changed files with 4 additions and 4 deletions

View File

@@ -1965,11 +1965,11 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
PRInt32 colon, fSlash;
PRUnichar port;
fSlash=urlSpec.Find('/');
fSlash=urlSpec.FindChar('/');
// if no scheme (protocol) is found, assume http.
if ( ((colon=urlSpec.Find(':')) == -1) // no colon at all
if ( ((colon=urlSpec.FindChar(':')) == -1) // no colon at all
|| ( (fSlash > -1) && (colon > fSlash) ) // the only colon comes after the first slash
|| ( (colon < urlSpec.Length()-1) // the first char after the first colon is a digit (i.e. a port)
&& ((port=urlSpec.CharAt(colon+1)) <= '9')