[haXe] Neko lastIndexOf seems wrong?

Pascal Péridont pperidont at motion-twin.com
Thu Sep 21 16:45:36 CEST 2006


Asger Ottar Alstrup a écrit :
> Hi,
>
> I tried to use
>
>         var test = "c:\\great\\stuff";
>         trace("Found " + test.lastIndexOf("\\", 0));
>
> in Neko. The result is surprisingly -1.
  public function testLastIndexOf(){
        var str = "c:\\great\\stuff";
        assertEquals(8,str.lastIndexOf("\\",str.length));
        assertEquals(-1,str.lastIndexOf("\\",0));
  }

This seems OK on all platforms.





More information about the Haxe mailing list