|
// retoor <retoor@molodetz.nl>
|
|
|
|
System.print("hello world hello".lastIndexOf("hello")) // expect: 12
|
|
System.print("hello".lastIndexOf("hello")) // expect: 0
|
|
System.print("hello".lastIndexOf("x")) // expect: -1
|
|
System.print("aaaa".lastIndexOf("aa")) // expect: 2
|
|
System.print("".lastIndexOf("x")) // expect: -1
|
|
|
|
System.print("hello world hello".lastIndexOf("hello", 11)) // expect: 0
|
|
System.print("hello world hello".lastIndexOf("hello", 12)) // expect: 12
|
|
System.print("hello world hello".lastIndexOf("hello", 100)) // expect: 12
|
|
System.print("hello".lastIndexOf("x", 3)) // expect: -1
|