mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 13:09:17 +02:00
* Added ReplaceStr and ReplaceText functions, for Delphi compatibility
git-svn-id: trunk@21810 -
This commit is contained in:
parent
bba75a079c
commit
025f840dd5
@ -96,6 +96,13 @@ Function PosEx(const SubStr, S: string): Integer;inline; // Offset: Cardinal = 1
|
|||||||
Function PosEx(c:char; const S: string; Offset: Cardinal): Integer;
|
Function PosEx(c:char; const S: string; Offset: Cardinal): Integer;
|
||||||
function StringsReplace(const S: string; OldPattern, NewPattern: array of string; Flags: TReplaceFlags): string;
|
function StringsReplace(const S: string; OldPattern, NewPattern: array of string; Flags: TReplaceFlags): string;
|
||||||
|
|
||||||
|
{ ---------------------------------------------------------------------
|
||||||
|
Delphi compat
|
||||||
|
---------------------------------------------------------------------}
|
||||||
|
|
||||||
|
Function ReplaceStr(const AText, AFromText, AToText: string): string;inline;
|
||||||
|
Function ReplaceText(const AText, AFromText, AToText: string): string;inline;
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
Soundex Functions.
|
Soundex Functions.
|
||||||
---------------------------------------------------------------------}
|
---------------------------------------------------------------------}
|
||||||
@ -744,6 +751,20 @@ begin
|
|||||||
Result := ResStr;
|
Result := ResStr;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ ---------------------------------------------------------------------
|
||||||
|
Delphi compat
|
||||||
|
---------------------------------------------------------------------}
|
||||||
|
|
||||||
|
Function ReplaceStr(const AText, AFromText, AToText: string): string;inline;
|
||||||
|
begin
|
||||||
|
AnsiReplaceStr(AText, AFromText, AToText);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function ReplaceText(const AText, AFromText, AToText: string): string;inline;
|
||||||
|
begin
|
||||||
|
AnsiReplaceText(AText, AFromText, AToText);
|
||||||
|
end;
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
Soundex Functions.
|
Soundex Functions.
|
||||||
---------------------------------------------------------------------}
|
---------------------------------------------------------------------}
|
||||||
|
Loading…
Reference in New Issue
Block a user