StringifyAndReplace()
StringifyAndReplace: Stringify the content, then replace every occurrence of pItem with the supplied value (pWith). pWith accepts the :With named-param form or a bare string. StringifyAndReplaceQ(item, with) returns This. XT variant is just an alias for the moment -- the original Softanza distinguished "internal-staff" semantics, but they collapse to the same engine path here.
Basic examples (2)
o1 = new stzList([ "--_--", [ 12, "--_--", 10], "--_--", 9 ])
o1.StringifyAndReplace("_", "♥")
? @@( o1.Content() )[ "--♥--", '[ 12, "--♥--", 10 ]', "--♥--", "9" ]
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 92_stringifyandreplace.ring(opens in a new tab)
o1 = new stzList([ "--_--", [ 12, "--_--", 10], "--_--", 9 ])
o1.StringifyAndReplaceXT("_", "♥") # Used by internal staff in Softanza
? @@( o1.Content() )[ "--♥--", '[ 12, "--♥--", 10 ]', "--♥--", "9" ]
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 91_stringifyandreplacext.ring(opens in a new tab)
Scope (2)
aLargeList = [ "--_--", [ 12, "--_--", 10], "--_--", 9 ]
for i = 1 to 1_000
aLargeList + "_--_"
next
o1 = new stzList(aLargeList)
o1.StringifyAndReplace("_", "♥")
? @@( o1.FirstNItems(5) )
? @@( o1.LastNItems(3) )[ "--♥--", '[ 12, "--♥--", 10 ]', "--♥--", "9", "♥--♥" ] [ "♥--♥", "♥--♥", "♥--♥" ]
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 96_firstnitems.ring(opens in a new tab)
aList = [ 10, 20, "One", "ONE", [ :Tunis, :Paris ], 30, "two" ]
for i = 1 to 10
aList + ("*" + i)
next
aList + "in"
aList + "out"
aList + "IN"
aList + "OUT"
o1 = new stzList(aList)
? @@( o1.StringifyAndReplaceQ(",", "*").Content() )
? o1.ContainsDuplicates()[ "10", "20", "One", "ONE", '[ "tunis"* "paris" ]', "30", "two", "*1", "*2", "*3", "*4", "*5", "*6", "*7", "*8", "*9", "*10", "in", "out", "IN", "OUT" ] 0
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 238_stringifyandreplace.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.ContainsDuplicatedItems · stzList.FirstNItems · stzList.LastNItems

