Softanza
DémarrerEnglish
Softanza
La bibliothèque se documente elle-même · Collections et objets

stzListReplacer

37 méthodes propres · 52 formes avec extensions, rangées sous leur méthode

la source: base/list/stzListReplacer.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : Collections et objets

Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens

Exemples : 0 viennent des tests de la bibliothèque ; 17 ont été composés à partir de la signature de chaque méthode et exécutés pour cette page, sur un objet neuf, par exemple o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"]). 20 méthodes n'en ont pas encore. Exemples exécutés le 2026-10-03 12:54 dans la bibliothèque au commit 0e72e2e2c.

Méthode
Explication, telle que la source la porte
init
initializationaucune extension
Content
content accessaucune extension
NumberOfItems
content access
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
? o1.NumberOfItems()
#--> 4
composé à partir de la signature, exécuté pour cette page
aucune extension
IsEmpty
content access
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
? o1.IsEmpty()
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
ReplaceAllItems
replacing all items with a new item
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAllItems(2)
? @@( o1.Content() )
#--> [ 2, 2, 2, 2 ]
composé à partir de la signature, exécuté pour cette 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
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAtPosition(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ReplaceItemAtPosition
replacing any item at a given position
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceItemAtPosition(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ReplaceAt
replacing any item at a given position
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAt(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune 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).
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceSection(2, 5, 2)
? @@( o1.Content() )
#--> [ "Foo", 2 ]
composé à partir de la signature, exécuté pour cette 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).
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceSectionByMany(2, 5, [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3 ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ReplaceManyByMany
replacing many items by manyQCSXTZZZIBWU
ReplaceAnyItemAtPositions
Set whatever lives at each of panPos to pNewItem.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ReplaceAnyItemsAtPositions
Same as ReplaceAnyItemAtPositions: Set whatever lives at each of panPos to pNewItem.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemsAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ReplaceItemsAtPositions
Same as ReplaceAnyItemAtPositions: Set whatever lives at each of panPos to pNewItem.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceItemsAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ReplaceAtPositions
Same as ReplaceAnyItemAtPositions: Set whatever lives at each of panPos to pNewItem.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAtPositions([ 2, 3 ], 2)
? @@( o1.Content() )
#--> [ "Foo", 2, 2, "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune extension
ReplaceAnyItemAt
Set the single position n to pNewItem (named-param aware).
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAt(2, 5)
? @@( o1.Content() )
#--> [ "Foo", 5, "FOO", "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune 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.aucune extension
ReplaceOccurrencesByMany
Replace items at the GIVEN positions with paNewItems consumed in order.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceOccurrencesByMany([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composé à partir de la signature, exécuté pour cette 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.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemAtPositionsByMany([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ReplaceAnyItemsAtPositionsByMany
Same as ReplaceAnyItemAtPositionsByMany: Same as ReplaceAnyItemAtPositionsByManyCS: Any item: zip positions <-> news (no value filter), truncating to shorter.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAnyItemsAtPositionsByMany([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composé à partir de la signature, exécuté pour cette page
QCSXTZZZIBWU
ReplaceAtByManyXT
Same as ReplaceAnyItemAtPositionsByManyXT: Same as ReplaceAnyItemAtPositionsByManyCSXT: XT: cycle news across ALL given positions.
exemple composé
o1 = new stzListReplacer(["Foo", "foo", "FOO", "bar"])
o1.ReplaceAtByManyXT([ 2, 3 ], [ 2, 3 ])
? @@( o1.Content() )
#--> [ "Foo", 2, 3, "bar" ]
composé à partir de la signature, exécuté pour cette page
aucune 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).aucune 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.aucune extension