mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 01:36:33 +02:00
jcf: remove some jcl dependencies
git-svn-id: trunk@17890 -
This commit is contained in:
parent
52e0efb143
commit
d578cccfd2
@ -58,10 +58,8 @@ implementation
|
||||
uses
|
||||
{ delphi }
|
||||
SysUtils,
|
||||
{ Jcl }
|
||||
JclStrings,
|
||||
{ local }
|
||||
Tokens, TokenUtils, JcfSettings,
|
||||
Tokens, TokenUtils, JcfSettings, JcfStringUtils,
|
||||
SettingsTypes, ParseTreeNodeType, SetClarify;
|
||||
|
||||
|
||||
|
@ -127,6 +127,7 @@ function BooleanToStr(B: Boolean): string;
|
||||
function StrToBoolean(const S: string): Boolean;
|
||||
|
||||
function StrFind(const Substr, S: string; const Index: Integer = 1): Integer;
|
||||
function StrIsOneOf(const S: string; const List: array of string): Boolean;
|
||||
|
||||
procedure TrimStrings(const List: TStrings; DeleteIfEmpty: Boolean = True);
|
||||
|
||||
@ -418,6 +419,19 @@ begin
|
||||
Result := StrSearch(LowerCase(SubStr), LowerCase(S), Index);
|
||||
end;
|
||||
|
||||
function StrIsOneOf(const S: string; const List: array of string): Boolean;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
for i := Low(List) to High(List) do
|
||||
if CompareStr(List[i], S) = 0 then
|
||||
begin
|
||||
Result := True;
|
||||
Exit;
|
||||
end;
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
procedure TrimStrings(const List: TStrings; DeleteIfEmpty: Boolean = True);
|
||||
var
|
||||
i: integer;
|
||||
|
Loading…
Reference in New Issue
Block a user