Softanza
StartFrançais
Softanza
The library documents itself · Collections & objects

stzListReplacer

37 own methods · 52 forms written with extensions, listed under their method

the source: base/list/stzListReplacer.ring(opens in a new tab) · All classes · The area reference: Collections & objects

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 17 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"]). 20 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
initializationno extension
Content
content accessno extension
NumberOfItems
content access
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
? o1.NumberOfItems()
#--> 4
composed from the signature, run for this page
no extension
IsEmpty
content access
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
? o1.IsEmpty()
#--> 0
composed from the signature, run for this page
no extension
ReplaceAllItems
replacing all items with a new item
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAllItems(2)
? @@( o1.Content() )
#--> [ 2, 2, 2, 2 ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceAllOccurrences
WITHOUT CASESENSITIVITYQCSXTZZZIBWU
ReplaceAll
Same as ReplaceAllOccurrences: WITHOUT CASESENSITIVITYQCSXTZZZIBWU
Replace
replacing all occurrences of an itemQCSXTZZZIBWUMany
AllOccurrencesReplaced
replacing all occurrences of an itemQCSXTZZZIBWU
ReplaceAnyItemAtPosition
replacing any item at a given position
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAtPosition(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceItemAtPosition
replacing any item at a given position
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceItemAtPosition(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composed from the signature, run for this page
no extension
ReplaceAt
replacing any item at a given position
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAt(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composed from the signature, run for this page
no extension
ReplaceNthOccurrence
replacing nth occurrence of an itemQCSXTZZZIBWU
ReplaceFirstOccurrence
replacing first occurrence of an itemQCSXTZZZIBWU
ReplaceLastOccurrence
replacing last occurrence of an itemQCSXTZZZIBWU
ReplaceSection
ReplaceSection: the section [n1..n2] is replaced by ONE new item -- -- if that item is a list, it is inserted as a SINGLE element. This is -- the canonical Softanza semantics (see ReplaceSectionByMany to splice).
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceSection(2, 5, 2)
? @@( o1.Content() )
#--> [ "Foo", 2 ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceSectionByMany
Same as ReplaceSectionByManyCS: ReplaceSectionByMany: the section [n1..n2] is replaced by SPLICING -- the items of paNewItems in place (flattened one level into the list).
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceSectionByMany(2, 5, [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3 ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceManyByMany
replacing many items by manyQCSXTZZZIBWU
ReplaceAnyItemAtPositions
Set whatever lives at each of panPos to pNewItem.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composed from the signature, run for this page
no extension
ReplaceAnyItemsAtPositions
Same as ReplaceAnyItemAtPositions: Set whatever lives at each of panPos to pNewItem.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemsAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composed from the signature, run for this page
no extension
ReplaceItemsAtPositions
Same as ReplaceAnyItemAtPositions: Set whatever lives at each of panPos to pNewItem.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceItemsAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composed from the signature, run for this page
no extension
ReplaceAtPositions
Same as ReplaceAnyItemAtPositions: Set whatever lives at each of panPos to pNewItem.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composed from the signature, run for this page
no extension
ReplaceAnyItemAt
Set the single position n to pNewItem (named-param aware).
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAt(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composed from the signature, run for this page
no extension
ReplaceThisItemAtPositions
Same as ReplaceThisItemAtPositionsCS: At each of panPos, replace ONLY if the item there equals pItem.QCSXTZZZIBWU
ReplaceThisItemAt
positional replacers (ported from the monolith)QCSXTZZZIBWU
ReplaceTheseItemsAtPositions
Same as ReplaceTheseItemsAtPositionsCS: At each of panPos, replace if the item there is a member of paItems.QCSXTZZZIBWU
ReplaceByMany
Same as ReplaceByManyCS: Replace the k-th occurrence of pItem with paNewItems[k] (in order).QCSXTZZZIBWU
ReplaceItemByManyXT
Same as ReplaceByManyXT: Same as ReplaceByManyCSXT: Cycling variant: paNewItems is reused round-robin across occurrences.no extension
ReplaceOccurrencesByMany
Replace items at the GIVEN positions with paNewItems consumed in order.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceOccurrencesByMany([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceItemAtPositionsByMany
Same as ReplaceItemAtPositionsByManyCS: At the panPos that hold pItem, replace the k-th such with paNewItems[k].QCSXTZZZIBWU
ReplaceTheseItemsAtPositionsByMany
Same as ReplaceTheseItemsAtPositionsByManyCS: These items: apply the per-item position-replace for each item in turn.QCSXTZZZIBWU
ReplaceAnyItemAtPositionsByMany
Same as ReplaceAnyItemAtPositionsByManyCS: Any item: zip positions <-> news (no value filter), truncating to shorter.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAtPositionsByMany([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceAnyItemsAtPositionsByMany
Same as ReplaceAnyItemAtPositionsByMany: Same as ReplaceAnyItemAtPositionsByManyCS: Any item: zip positions <-> news (no value filter), truncating to shorter.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemsAtPositionsByMany([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composed from the signature, run for this page
QCSXTZZZIBWU
ReplaceAtByManyXT
Same as ReplaceAnyItemAtPositionsByManyXT: Same as ReplaceAnyItemAtPositionsByManyCSXT: XT: cycle news across ALL given positions.
composed example
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAtByManyXT([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composed from the signature, run for this page
no extension
ReplaceItemsW
Same as ReplaceW: Replace every item matching the :Where boolean expr with the :By value. -- Matching positions come from the engine-backed FindAllW (@item placeholder).no extension
ReplaceNextNthOccurrence
Same as ReplaceNextNthOccurrenceCS: Replace the n-th occurrence of pItem at or after position pnStartingAt.QCSXTZZZIBWUST
ReplaceNthNextOccurrenceST
Same as ReplaceNextNthOccurrence: Same as ReplaceNextNthOccurrenceCS: Replace the n-th occurrence of pItem at or after position pnStartingAt.no extension