jcf: remove some jcl dependencies

git-svn-id: trunk@17890 -
This commit is contained in:
paul 2008-12-23 03:47:34 +00:00
parent 52e0efb143
commit d578cccfd2
2 changed files with 15 additions and 3 deletions

View File

@ -58,10 +58,8 @@ implementation
uses
{ delphi }
SysUtils,
{ Jcl }
JclStrings,
{ local }
Tokens, TokenUtils, JcfSettings,
Tokens, TokenUtils, JcfSettings, JcfStringUtils,
SettingsTypes, ParseTreeNodeType, SetClarify;

View File

@ -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;