mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-05-10 03:00:06 -04:00
lastIndexOf
This commit is contained in:
17
inputs/passing/stringMethods/lastIndexOf.ts
Normal file
17
inputs/passing/stringMethods/lastIndexOf.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// test_output! [[4,2,4,6],[-1,-1]]
|
||||
|
||||
export default function () {
|
||||
const positive = [
|
||||
" xxx".lastIndexOf("x"),
|
||||
"xxx ".lastIndexOf("x"),
|
||||
" xxx ".lastIndexOf("x"),
|
||||
" xyxyxy ".lastIndexOf("xy"),
|
||||
];
|
||||
|
||||
const negative = [
|
||||
" xxx ".lastIndexOf("x", 5),
|
||||
"abc".lastIndexOf("abcd"),
|
||||
];
|
||||
|
||||
return [positive, negative];
|
||||
}
|
||||
Reference in New Issue
Block a user