Skip to main content
Table of Contents

TTMSFNCMemo.Replace Method

Replaces a specific range with the supplied text.

API unit family: TMSFNCMemo Declaring type: TTMSFNCMemo Inherited from: TTMSFNCCustomMemo

Overloads

Overload 1

Replaces a specific range with the supplied text.

FMX.TMSFNCMemo.hppPascalC++
procedure Replace(AStartPos, ALength: Integer; AReplaceString: string); overload;
void __fastcall Replace(int AStartPos, int ALength, System::UnicodeString AReplaceString)/* overload */;

Parameters

Name Description
AStartPos The start position of the text to replace.
ALength The number of characters to replace.
AReplaceString The replacement text.

Overload 2

Replaces the current selection or active match with the supplied text.

FMX.TMSFNCMemo.hppPascalC++
procedure Replace(AReplaceString: string); overload;
void __fastcall Replace(System::UnicodeString AReplaceString)/* overload */;

Parameters

Name Description
AReplaceString The replacement text.

Overload 3

Searches and replaces text using the supplied options and behavior.

FMX.TMSFNCMemo.hppPascalC++
procedure Replace(ASearchString, AReplaceString: string; AOptions: TTMSFNCMemoFindOptions; ABehaviour: TTMSFNCMemoFindBehaviour = fbDown); overload;
void __fastcall Replace(System::UnicodeString ASearchString, System::UnicodeString AReplaceString, const TTMSFNCMemoFindOptions &AOptions, TTMSFNCMemoFindBehaviour ABehaviour = (TTMSFNCMemoFindBehaviour)(0x0))/* overload */;

Parameters

Name Description
ASearchString The text to search for.
AReplaceString The replacement text.
AOptions The search or replace options to apply.
ABehaviour The search direction or behavior.

Overload 4

Searches and replaces text using the supplied behavior.

FMX.TMSFNCMemo.hppPascalC++
procedure Replace(ASearchString, AReplaceString: string; ABehaviour: TTMSFNCMemoFindBehaviour = fbDown); overload;
void __fastcall Replace(System::UnicodeString ASearchString, System::UnicodeString AReplaceString, TTMSFNCMemoFindBehaviour ABehaviour = (TTMSFNCMemoFindBehaviour)(0x0))/* overload */;

Parameters

Name Description
ASearchString The text to search for.
AReplaceString The replacement text.
ABehaviour The search direction or behavior.