Find()
Find the given item: the positions of EVERY occurrence, as a list (engine-backed). (case-sensitive by default)
Basic examples (2)
# find example 1 ? @@( Q([1, 2, 3, 4, 5, 3, 7]).Find(3) )
[ 3, 6 ]
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 189_find.ring(opens in a new tab)
o1 = new stzList( [ 0, 8, 0, 0, 1, 8, 0, 0 ] )
? @@( o1.FindW('{ This[ @i - 3 ] = This[ @i + 3 ] }') )[ 4 ]
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 487_findwxt.ring(opens in a new tab)
Scope (8)
o1 = new stzList([ 1, "a", 2, "b", 3, "c" ])
? o1.FindWF( func x { return isString(x) and Q(x).isLowercase() } )2 4 6
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 530_findwxt.ring(opens in a new tab)
o1 = new stzList([ "_", "_", 1:3, "_", 5:9, "_" ])
? o1.FindWF( func x { return Q(x).IsOneOfThese([ 1:3, 5:9 ]) } )3 5
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 476_findwxt.ring(opens in a new tab)
o1 = new stzList([ "a", "b", "e", "a", "c", "v", "e" ]) ? o1.FindMany([ "a", "e" ]) ? @@NL( o1.TheseItemsZ([ "a", "e" ]) )
1 3 4 7 [ [ "a", [ 1, 4 ] ], [ "e", [ 3, 7 ] ] ]
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 460_findmany.ring(opens in a new tab)
o1 = new stzList([ "1", "2", "♥", "4", "5", "♥", "6", "7", "♥", "9" ])
? @@( o1.Find("♥") ) + NL
? @@( o1.AntiFind("♥") ) + NL[ 3, 6, 9 ] [ 1, 2, 4, 5, 7, 8, 10 ]
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 34_find_and_antifind_in_stzlist.ring(opens in a new tab)
o1 = new stzList([ :one, :two, :one, :three, :one, :four ]) ? o1.FindMany([ :one, :five ]) ? @@(o1.TheseItemsZ([ :one, :five ]))
1 3 5 [ [ "one", [ 1, 3, 5 ] ], [ "five", [ ] ] ]
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 467_findmany.ring(opens in a new tab)
o1 = new stzList(["_", "A", "*", "_", "B", "*", "_", "C", "*" ]) ? o1.FindW( :Where = ' @NextItem = "*" ' ) ? o1.ItemsW( :Where = ' @NextItem = "*" ' )
2 5 8 A B C
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 548_findwxt.ring(opens in a new tab)
o1 = new stzList([ "a", "E", "a", "c", "V", "E" ]) ? o1.FindMany([ "a", "c" ]) ? o1 - These([ "a", "c" ]) # Same as: o1.RemoveItemsAtPositions([ 1, 3, 4 ])
1 3 4 E V E
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 461_findmany.ring(opens in a new tab)
o1 = new stzList([ 2, 8, 2, 2, 11, 2, 11, 7, 7, 4, 2, 1, 3, 2, 10, 8, 3, 3, 3, 6, 8 ])
? o1.FindW( '{ @Number = @NextNumber }' )
? o1.FindW( '{ This[@i] = This[@i+1] }' )3 8 17 18 3 8 17 18
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 485_findwxt.ring(opens in a new tab)
and 14 more in the tests
The extensions of this method
Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).
Every example is a test file of the library, run inside the library for this page; only those whose output kept every promise their file wrote are shown.
See also
- The class stzList
- The area's reference: Collections & objects
- The other methods in these examples: stzList.AntiFind · stzList.Contains · stzList.Content · stzList.Count · stzList.FindAllItemsW · stzList.FindFirst · stzList.FindItem · stzList.FindItems · stzList.FindLast · stzList.FindNext · stzList.Items · stzList.ItemsAtPositions
- How-to: Find the position of an item in a list

