help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

StringReplace

Replace occurrences of one substring with another in a string.

Declaration

Source position: sysstrh.inc line 198

function StringReplace(

  const S: String;

  const OldPattern: String;

  const NewPattern: String;

  Flags: TReplaceFlags

):String;

Description

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 runed 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

TReplaceFlags

  

Flags for StringReplace function

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505