Replace - DfBaseEdit
Finds and Replaces Text in an edit object
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| sOldtext | String | The text to search for |
| sNewText | String | The text that replaces sOldText |
Syntax
Procedure Replace String sOldtext String sNewText
Call Example
Send Replace sOldtext sNewText
Description
The Replace function finds text matching sOldtext and replaces it with sNewText. It starts the search from the last replace position and searches to the end of the buffer. The Reset_Replace message may be sent to force the find to start at the start of the buffer.
The search is case sensitive.
The replace operation only works if the edit object is active.
Procedure DoReplace string sOldText string sNewText
send Reset_Replace // start from top of buffer
send Replace sOldText sNewText
End_Procedure