Steve Clark <[EMAIL PROTECTED]> wrote:
>
> From jst:
>
<snip>
>In nsHTMLDocument.cpp there's this line that looks wrong
>
>+ if (charset.RFind("864", PR_TRUE )) {
>
>First of all, why not use the faster Find() in stead of RFind()? And why
>do an expensive case-insensitive search when you're looking for numbers?
>
>Also, it looks like the assumption is that RFind() returns true or false
>depending on whether the string is found or not but that's not what it
>does, it returns the index in the string where the substring was found,
>or -1 if the result isn't found. The same is true for Find().
I accept your other comments, but I think the reason for using RFind
is that if the substring "864" is present in the charset name, it will
always be at or near the end. (ibm864 or ibm864i)
Simon
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Lina Kemel
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Chris Waterson
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Lina Kemmel
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 smontagu
- Re: Review of Bi-Di code, bug 62777 Arthur Barrett
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Simon Montagu
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
- Re: Review of Bi-Di code, bug 62777 Erik van der Poel
