Contents - Index


REPLACE$

 

REPLACE$(A$, B$, S$)

 

REPLACE$ requires 3 parameters.  All three parameters are string constants or string variables.  The function searches (non-case sensitive) for the first occurence of string A$ in string S$ and if it finds it, it replaces A$ with B$.

 

Example: 

S$='The cat ran across the street'

A$='cat'

B$='dog'

S2$=replace$(A$,B$,S$)

 

{Solution:

A$='cat'

B$='dog'

S$='The cat ran across the street'

S2$='The dog ran across the street'

}

 

Return to String Functions