REPLACE$

Top  Previous  Next

Syntax

REPLACE$(dest as STRING, start as INT, count as INT, source as STRING)

Description

Replaces characters in one string with one or more characters from another.

Parameters

dest - String with characters to be replaced.

start - Ones based starting position of the replacement.

count - Number of characters to replace.

source - String containing the replacement characters.

Return value

None

Remarks

If count specifies more characters then exists in source then all of the characters in source are copied to dest up to the total length of the destination string.

Example usage

DEF s:string
s = "All good DOGs go to heaven"
REPLACE$ s,10,3,"dog"
PRINT s