Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
type
TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);
function StringReplace(const S, OldStr, NewStr: string; Flags: TReplaceFlags): string;
Returns a string in which a specified substring has been replaced with another substring.
If the Flags parameter does not include rfReplaceAll, only the first occurrence of OldStr in S is replaced. Otherwise, all instances of OldStr are replaced by NewStr.
If the Flags parameter includes rfIgnoreCase, the comparison operation is case insensitive.
var s : string;
s:='VB programmers love About VB Programming site';
s := ReplaceStr(s,'VB','Delphi', [rfReplaceAll]);
//s='Delphi programmers love
About Delphi Programming site';
|
String Types in Delphi
Understanding and managing string data types in Delphi's Object Pascal. Learn about differences between Short, Long, Wide and null-terminated strings.
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|