Sign in Join
FPDoc Onlineexperiment

TAnsiStringBuilder.Replace function

Member of TAnsiStringBuilderpublicIn unit sysutils

Replace a range of characters.

Declaration

pascal
function Replace(const OldChar: AnsiChar; const NewChar: AnsiChar)
: TAnsiStringBuilder
function Replace(const OldChar: AnsiChar; const NewChar: AnsiChar; 
 StartIndex: Integer; Count: Integer)
: TAnsiStringBuilder
function Replace(const OldValue: RawByteString; 
 const NewValue: RawByteString): TAnsiStringBuilder
function Replace(const OldValue: RawByteString; 
 const NewValue: RawByteString; StartIndex: Integer; 
 Count: Integer): TAnsiStringBuilder

Description

Replace replaces occurrences of OldValue with the characters in NewValue. The search operation starts at position StartIndex (0-based, default 0) till position StartIndex+aCount is reached.

Errors

If StartIndex or StartIndex+aCount is out of range, an ERangeError exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.