JCL Help:StrReplace@AnsiString@AnsiString@AnsiString@TReplaceFlags

From Project JEDI Wiki
Jump to navigationJump to search


Summary

StrReplace replaces one or all occurrences of the specified search pattern with the supplied replace string.


Pascal

 procedure StrReplace(var S: string; const Search: string; const Replace: string; Flags: TReplaceFlags = []);
procedure StrReplace(var S: AnsiString; const Search: AnsiString; const Replace: AnsiString; Flags: TReplaceFlags = []);


Parameters

Parameters Description
var S: string The source string.
const Search: string The substring to replace.
const Replace: string The string to use as a replacement of Search.


Description

StrReplace replaces one or all occurrences of the specified search pattern with the supplied replace string. The flags determine how the search is done and if only one or if all occurrences should be replaced.
TReplaceFlags = [rfIgnoreCase, rfReplaceAll]
If rfIgnoreCase is is within the flags the search is performed case insenitive, otherwise it is case sensitive. If rfReplaceAll is specified StrReplace replaces all occurrences otherwise only the first one.


About

Unit

JclAnsiStrings


Donator

Robert Lee


Contributors

Robert Rossmair


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page