Softanza
StartFrançais
Softanza
Reference · stzString

Remove()

Remove every occurrence of pcSubStr from the string (mutating). For a copy, use Removed.

also: delete erase take out strip drop

The forms of this verb

Remove · Removed

Basic examples (2)

Softanza
? Q("rixxnxg").RemoveQ("x").UppercaseQ().Spacified()
Output
R I N G

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 03-read-the-name-as-a-sentence.en.md(opens in a new tab)

Softanza
# removing isLowercase(@char) leaves the uppercase letters
? Q("SOooooFTAaaannnNZA").RemoveWQ('isLowercase(@char)').Content()
Output
SOFTANZA

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 504_removew.ring(opens in a new tab)

Scope (8)

Softanza
o1 = new stzString("^^♥^^")
o1.RemoveXT( "♥", :AtPosition = 3)
# carets only
? o1.Content()
Output
^^^^

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 895_content.ring(opens in a new tab)

Softanza
o1 = new stzString("/♥♥♥\__/♥\/♥♥\__/♥\__")
o1.RemoveXT([], "♥")
# same result
? o1.Content()
Output
/\__/\/\__/\__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 893_content.ring(opens in a new tab)

Softanza
o1 = new stzString("__♥__♥__♥)__")
o1.RemoveXT( ")", :AfterLast = "♥" )
# cleaned
? o1.Content()
Output
__♥__♥__♥__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 876_content.ring(opens in a new tab)

Softanza
o1 = new stzString("__♥)__♥__♥__")
o1.RemoveXT( ")", :AfterFirst = "♥" )
# cleaned
? o1.Content()
Output
__♥__♥__♥__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 875_content.ring(opens in a new tab)

Softanza
o1 = new stzString("__♥__♥__(♥__")
o1.RemoveXT( "(", :BeforeLast = "♥" )
# cleaned
? o1.Content()
Output
__♥__♥__♥__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 881_content.ring(opens in a new tab)

Softanza
o1 = new stzString("__(♥__♥__♥__")
o1.RemoveXT( "(", :BeforeFirst = "♥" )
# cleaned
? o1.Content()
Output
__♥__♥__♥__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 880_content.ring(opens in a new tab)

Softanza
o1 = new stzString("/♥♥♥\__/♥\/♥♥\__/♥\__")
o1.RemoveXT("♥", [])
# every heart gone
? o1.Content()
Output
/\__/\/\__/\__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 892_content.ring(opens in a new tab)

Softanza
o1 = new stzString("__♥__♥)__♥__")
o1.RemoveXT( ")", :AfterNth = [2, "♥"] )
# cleaned
? o1.Content()
Output
__♥__♥__♥__

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 874_content.ring(opens in a new tab)

and 16 more in the tests

The extensions of this method

Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).

Extension
Exists
What it adds · The names
Q
yes
does what the method does, then returns the object, so the call can be chained · RemoveQ, RemoveWQ, RemoveCSQ, RemoveXTQ and 2 more
QQ
no
chains on the next, more specific type of object (the Q ladder)
QQQ
no
chains on the most specific type of object (the Q ladder)
QRT
no
returns the result as an object of the requested type
CS
yes
takes a case-sensitivity flag · RemoveCS, RemoveCSQ, RemoveManyCS, RemoveManyCSQ
ST
no
takes the position to start from (StartingAt)
IB
no
takes bounds that are included (IncludingBounds)
XT
yes
the extended form: more parameters than the base method · RemoveXT, RemoveXTQ
XTT
no
yet another extension: a further extended form, after XT
Z
no
includes the position in what it returns
ZZ
no
returns positions as sections, [start, end]
W
yes
selects by a condition · RemoveW, RemoveWQ
WF
no
selects by a condition, with the expressive keywords (@NextItem, @PreviousItem...)
D
no
takes a direction, forward or backward (Directional)
F
no
takes a function (the condition or the update is given as a function); the forms document also uses F for the future form, which defers the action
Many
yes
works on a collection of items instead of one (the plural form) · RemoveMany, RemoveManyQ, RemoveManyCS, RemoveManyCSQ
Except
no
takes exceptions, what to leave out (the exceptional form)
U
no
returns the result without duplication

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