Skip to content

Replace

Narta Xaymar Dirks edited this page Oct 28, 2026 · 6 revisions

Blitz3DBlitzPlusBlitzBasic

Replace

Replace:String string:String, from:String, to:String
Parameter Mode Type Default Description
string In String required The text to change.
from In String required What to look for.
to In String required What to put in its place. May be empty to remove it.

Returns: The changed text.

Description

Replaces every occurrence of a piece of text with another. What was put in is not searched again, so replacing a with aa does not loop.

Examples

Print Replace$("a-b-c", "-", "+")
Print Replace$("a-b-c", "-", "")
a+b+c
abc

Related Commands

LSet, Mid, Right, RSet

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally