mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-27 13:00:11 +02:00
* Remove some duplicates
This commit is contained in:
parent
75c570f2b2
commit
b7e3150635
@ -44,8 +44,8 @@ Function AnsiEndsStr(const ASubText, AText: string): Boolean;
|
|||||||
Function AnsiReplaceStr(const AText, AFromText, AToText: string): string;
|
Function AnsiReplaceStr(const AText, AFromText, AToText: string): string;
|
||||||
Function AnsiMatchStr(const AText: string; const AValues: array of string): Boolean;
|
Function AnsiMatchStr(const AText: string; const AValues: array of string): Boolean;
|
||||||
Function AnsiIndexStr(const AText: string; const AValues: array of string): Integer;
|
Function AnsiIndexStr(const AText: string; const AValues: array of string): Integer;
|
||||||
Function MatchStr(const AText: UnicodeString; const AValues: array of UnicodeString): Boolean;
|
Function MatchStr(const AText: String; const AValues: array of String): Boolean;
|
||||||
Function IndexStr(const AText: UnicodeString; const AValues: array of UnicodeString): Integer;
|
Function IndexStr(const AText: String; const AValues: array of String): Integer;
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
Miscellaneous
|
Miscellaneous
|
||||||
@ -357,13 +357,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function MatchStr(const AText: UnicodeString; const AValues: array of UnicodeString): Boolean;
|
Function MatchStr(const AText: String; const AValues: array of String): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := IndexStr(AText,AValues) <> -1;
|
Result := IndexStr(AText,AValues) <> -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function IndexStr(const AText: UnicodeString; const AValues: array of UnicodeString): Integer;
|
Function IndexStr(const AText: String; const AValues: array of String): Integer;
|
||||||
var
|
var
|
||||||
i: longint;
|
i: longint;
|
||||||
begin
|
begin
|
||||||
@ -665,29 +665,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function LeftStr(const AText: WideString; const ACount: SizeInt): WideString;
|
|
||||||
begin
|
|
||||||
Result:=Copy(AText,1,ACount);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
Function RightStr(const AText: WideString; const ACount: SizeInt): WideString;
|
|
||||||
var
|
|
||||||
j,l:SizeInt;
|
|
||||||
begin
|
|
||||||
l:=length(atext);
|
|
||||||
j:=ACount;
|
|
||||||
if j>l then j:=l;
|
|
||||||
Result:=Copy(AText,l-j+1,j);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
Function MidStr(const AText: WideString; const AStart, ACount: SizeInt): WideString;
|
|
||||||
begin
|
|
||||||
Result:=Copy(AText,AStart,ACount);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
Function PosEx(const SubStr, S: string; Offset: SizeUint): SizeInt;
|
Function PosEx(const SubStr, S: string; Offset: SizeUint): SizeInt;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user