ReplaceSection()
Replace the chars at positions n1..n2 (inclusive) with pcNewSubStr. Ported from the legacy monolithic archive (~line 84916), kept minimal: pure numeric positions only. Symbolic forms (:First/:Last) are not yet supported.
Basic examples (2)
o1 = new stzString("123--67--")
o1.ReplaceSection(1, 3, "~")
# collapsed
? o1.Content()~--67--
run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 963_content.ring(opens in a new tab)
o1 = new stzString("--345--89--")
o1.ReplaceSection(8, 9, "~")
# collapsed
? o1.Content()--345--~--
run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 964_content.ring(opens in a new tab)
Scope (3)
o1 = new stzString("ABC*EF")
o1.ReplaceSection( 4, 4, "D")
# the star became D
? o1.Content()ABCDEF
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 253_content.ring(opens in a new tab)
o1 = new stzString("123456789")
o1.ReplaceSection(4, 6, :With = "***")
# stars in place
? o1.Content()123***789
run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 789_content.ring(opens in a new tab)
o1 = new stzString("123456789")
o1.ReplaceSection(4, 6, :with = "♥♥♥")
# the middle becomes hearts
? o1.Content()123♥♥♥789
run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 374_content.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.

