DeepContains()
Same as DeepContainsCS: stzListPaths has only 3 methods - minimal, skip for now -- DeepRemove / DeepRemoveMany: walk the nested list structure and drop any item that matches pItem / any item in paItems. Recurses into nested lists. Ported from archive line 16144; simpler implementation here -- pure structural walk, no @@()-stringification round-trip. DeepContains / DeepContainsCS: does the (nested) list contain pItem at any depth? Recursive walk. Complements DeepRemove.
also written: DeeplyContains
Basic examples (2)
o1 = new stzList([ "1", "1", [ "2", "♥", "2"], "1", [ "2", ["3", "🌞"] ] , "3" ])
? o1.FindFirst("3")
? o1.FindNth(3, "1")
? o1.Contains([ "2", "♥", "2"])
? o1.DeepContains("🌞")
? o1.DeepContainsMany([ "1", "♥", "3", "🌞" ]) # Or DeepContainsThese()
? o1.DeepContainsBoth("♥", :And = "🌞")
? o1.DeepContainsOneOfThese(["_", "🌞", "0" ])
? o1.DeepContainsNOfThese(2, ["_", "🌞", "0", "♥" ])6 4 1 1 1 1 1 1
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 326_findfirst.ring(opens in a new tab)
o1 = new stzList([
"1",
"🌞",
"1",
[ "2", "🌞", "2", "🌞"],
"1",
[ "2", ["3", "🌞"] ]
])
? o1.DeepContains("🌞")
? @@( o1.DeepFind("🌞") )
o1.DeepReplace("🌞", :By = "♥")
? @@( o1.Content() )
o1.DeepRemove("♥")
? @@SP( o1.Content() )1 [ [ 2 ], [ 4, 2 ], [ 4, 4 ], [ 6, 2, 2 ] ] [ "1", "♥", "1", [ "2", "♥", "2", "♥" ], "1", [ "2", [ "3", "♥" ] ] ] [ "1", "1", [ "2", "2" ], "1", [ "2", [ "3" ] ] ]
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 106_deepcontains.ring(opens in a new tab)
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.Contains · stzList.DeepContainsBoth · stzList.DeepContainsNOfThese · stzList.DeepContainsOneOfThese · stzList.DeepFind · stzList.DeepRemove · stzList.DeepReplace · stzList.FindFirst · stzList.FindNth

