fileBuffer.StripChars("\r");
StripChar(fileBuffer, '\r');
nsresult LoadURLsFromFile(char *aFileName){    nsresult rv = NS_OK;    PRInt32 len, offset;    PRFileDesc* fd;    char buffer[1024];    nsCString fileBuffer;    nsCAutoString urlString;    fd = PR_Open(aFileName, PR_RDONLY, 777);    if (!fd) {        return NS_ERROR_FAILURE;    }    // Keep reading the file until EOF (or an error) is reached...            do {        len = PR_Read(fd, buffer, sizeof(buffer));        if (len>0) {            fileBuffer.Append(buffer, len);            // Treat each line as a URL...            while ((offset = fileBuffer.FindChar('\n')) != -1) {                fileBuffer.Left(urlString, offset);                fileBuffer.Cut(0, offset+1);                urlString.StripChars("\r");                if (urlString.Length()) {                    LOG(("\t%s\n", urlString.get()));                    rv = StartLoadingURL(urlString.get());                }            }        }    } while (len>0);    // If anything is left in the fileBuffer, treat it as a URL...    fileBuffer.StripChars("\r");    if (fileBuffer.Length()) {        LOG(("\t%s\n", fileBuffer.get()));        StartLoadingURL(fileBuffer.get());    }    PR_Close(fd);    return NS_OK;}