[webkit-qt] Javascript string lastIndexOf method not working

Benjamin Poulain benjamin.poulain at nokia.com
Mon Apr 18 03:02:52 PDT 2011


On 04/17/2011 02:10 PM, ext Dwayne wrote:
> I am having trouble with the lastIndexOf string method not working in
> javascript. The method always fails (-1 as returned index).
>
> For example:
>
> var mystring = new String(‘{string}’);
>
> mystring.length => 8
>
> mystring.indexOf(‘{‘) => 0
>
> mystring.lastIndexOf(‘}’) => -1 ?!?!?!
>
> This seems like very basic behavior to be failing at this point. Anyone
> else seeing this? I am using Qt 4.7.2. I didn’t see a bug filed
>
> On this on the trac page, so I’ll open a ticket if I’m not doing
> something stupid.

I have no problem with this code (with the quotes replaced by correct 
ones). Tested with Rekonq + 4.7.x and with trunk.

cheers,
Benjamin


More information about the webkit-qt mailing list