StringReplace function
Replace occurrences of one substring with another in a string.
Declaration
function StringReplace(const S: Ansistring;
const OldPattern: Ansistring;
const NewPattern: Ansistring;
Flags: TReplaceFlags; out aCount: Integer)
: ansistringDescription
StringReplace searches the string
S for
occurrences of the string
OldPattern and, if it is found,
replaces it with
NewPattern. It returns the resulting string. The
behaviour of
StringReplace can be tuned with
Flags,
which is of type
TReplaceFlags. Standard behaviour is to
replace only the first occurrence of
OldPattern, and to search
case sensitively.Errors
None.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
